Commit Graph

45290 Commits

Author SHA1 Message Date
Sage Weil
8ad594fb05 tracing: fix librados signed/unsigned warnings
Signed-off-by: Sage Weil <sage@redhat.com>
2015-11-09 09:03:23 -05:00
Piotr Dałek
057d39a107 os/osd: disable extra iterator validation
In a number of loops using ObjectMapIterator, the iterator is validated
twice, first as an loop break condition, then during iter->next() call.
Suppress the validation in next() method in those cases for better
performance.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
2015-11-09 09:03:23 -05:00
Piotr Dałek
117f40c690 os/KeyValueDB: don't call self.valid() from next() and prev()
In most loops using ObjectMapIteratorImpl, there is a call to valid()
followed by a call to next(), which calls valid() again. Calling
valid() alone is particularly expensive, so don't do it twice if
possible.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
2015-11-09 09:03:22 -05:00
Piotr Dałek
66b7b920cf mon/MonitorDBStore: use single-key LevelDB::get() method
Make MonitorDBStore use single-key ::get() method for some performance
increase in heavy K/V workloads.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
2015-11-09 09:03:22 -05:00
Piotr Dałek
a3f88918c9 os/DBObjectMap: use single-key LevelDB::get method
Make FileStore use single-key ::get() method for some performance
increase in k/v-heavy workloads.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
2015-11-09 09:03:22 -05:00
Piotr Dałek
76eb04aeef kv/LevelDBStore: simpler code for single-key fetches
Often there's a need to fetch value for a specified, single key. Publish
a new method in LevelDB that takes key and prefix and puts just value at
specified address, without the need for interim keysets or resultsets.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
2015-11-09 09:03:22 -05:00
Piotr Dałek
e184ca2339 os/LevelDBStore: faster LevelDBTransactionImpl::set
This patch builds on Sage's idea to reduce bufferlist copying on
::set() calls. Initial patch reduced LevelDB's Slice generation
time from ~57ns to ~5ns in best-case scenario (bufferlist with
single bufferptr or contiguous bufferptrs), this patch reduces
slice generation time from ~57ns to ~11ns in worst case scenario
(under assumption that entire value length is at most 128KB),
leaving old code path for extremely-bad cases.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
2015-11-09 09:03:22 -05:00
Sage Weil
48ceaaf0cc kv/RocksDBStore: do not Delete before Put
A put implicitly overwrites the previous value.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-11-09 09:03:22 -05:00
Sage Weil
1e3c2fa21a kv/LevelDBStore: do not Delete before Put
A put implicitly overwrites the previous value.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-11-09 09:03:22 -05:00
Sage Weil
338b4ed4be osd/ReplicatedPG: use bl-based setkeys/rmkeys
FIXME: what about the tracepoint?

Signed-off-by: Sage Weil <sage@redhat.com>
2015-11-09 09:03:21 -05:00
Sage Weil
cdcdd78f3b osd/ReplicatedBackend: add bl-based setkeys/rmkeys
Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-19 15:05:49 -04:00
Sage Weil
126ba59b78 os/MemStore: avoid STL map/set for omap_{setkeys,rmkeys}
Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-19 15:05:49 -04:00
Sage Weil
332481eba0 os/newstore: avoid STL map/set for omap_{setkeys,rmkeys}
Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-19 15:05:49 -04:00
Sage Weil
7fc05b4821 os/ObjectStore: helpers for validating map<string,string> and set<string> to bl
Test/validate the encoding, and reference the resulting (encoded) data in
a bufferlist.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-19 15:05:49 -04:00
Sage Weil
6c50b335b6 os/ObjectStore: add bufferlist-based omap_setkeys() and omap_rmkeys()
Often the caller has a bufferlist and not an STL map/set.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-19 14:38:07 -04:00
Sage Weil
1019ec1324 kv/KeyValueDB: add bufferlist-based set() and rmkeys() interface
Often the caller has an encoded bl and not an STL map/set.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-19 14:37:53 -04:00
Sage Weil
ca72d506cd kv/LevelDBStore: make set() avoid bufferlist copy most of the time
Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-19 14:06:28 -04:00
Sage Weil
c9c961809a kv/RocksDBStore: make get() avoid bufferlist copy most of the time
Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-19 14:06:28 -04:00
Sage Weil
1b25ef8ac6 buffer: make is_contiguous() const
Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-19 14:06:28 -04:00
Sage Weil
1f3c01b3db kv/RocksDBStore: implement single-item get()
Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-19 13:15:13 -04:00
Piotr Dałek
8874249a9b test/ObjectMap: add test for raw_key_is_prefixed
Add a raw_key_is_prefixed() method to KeyValueDBMemory and a basic
test for raw_key_is_prefixed().

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
2015-10-19 12:57:31 -04:00
Piotr Dałek
709b111cea os/KeyValueDB: reduce malloc/free/string copy count
In RocksDB, LevelDB and Kinetic wrapper code, there is unnecessary
string copying. In particular, split_key makes an extra copy of string
(as a basis for extracted key and/or value), which can be easily omitted.
Also, checking for iterator validity generates std::pair with prefix
and key and checks prefix with the one from pair, wasting memory for
key.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
2015-10-19 12:57:23 -04:00
Sage Weil
e1783d2333 kv: move KeyValueDB from os/ to kv/, libos.a to libkv.a
Better code organization, and it will allow us to link less code into
the mon.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-19 12:55:56 -04:00
Sage Weil
b271b258b0 break KeyValueDB dependency on ObjectMap
ObjectMap should be fully derived from the generic KeyValueDB.  Fix all
the #include fallout from that.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-19 12:40:05 -04:00
Sage Weil
79c43b90ec test: use KeyValueDB directly (not LevelDBStore!)
Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-19 12:40:05 -04:00
Sage Weil
d1646e0e8d Makefile: link TrackedOp in libglobal
1- It doesn't belong in libos.a
2- Automake doesn't like building it as both .la and .a
3- We shouldn't build it 3x anyway

Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-19 12:39:54 -04:00
Loic Dachary
d8a320869f Merge pull request #6311 from liewegas/wip-rocksdb
rocksdb: build with PORTABLE=1

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-10-19 16:21:09 +02:00
Sage Weil
b22690e7d6 os/Makefile: build rocksdb with PORTABLE=1
Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-19 10:15:38 -04:00
John Spray
d4a4e442d4 Merge pull request #6282 from dx9/wip-12406-client-flock
client: sys/file.h includes for flock operations

Reviewed-by: John Spray <john.spray@redhat.com>
2015-10-19 11:45:53 +01:00
Sage Weil
0ed9088874 Merge pull request #6216 from dx9/wip-12406-alpine-prefixed-typeof
compat: use prefixed typeof extension

Reviewed-by: Sage Weil <sage@redhat.com>
2015-10-18 21:12:53 -04:00
Sage Weil
ba5100df6e Merge pull request #6279 from branch-predictor/bp-reorder-pglog-fields
osd/PGLog.h: reorder bool fields in PGLog struct

Reviewed-by: Sage Weil <sage@redhat.com>
2015-10-18 21:08:05 -04:00
John Coyle
5e811407be client: sys/file.h includes for flock operations
Signed-off-by: John Coyle <dx9err@gmail.com>
2015-10-18 21:06:59 -04:00
Sage Weil
dc4a69b5ed Merge pull request #6288 from dx9/wip-12406-file-offset-check
libcephfs: only check file offset on glibc platforms

Reviewed-by: John Spray <john.spray@redhat.com>
2015-10-18 21:05:46 -04:00
Sage Weil
58a7d66606 Merge pull request #6294 from dx9/wip-12406-rgw_main-compat
rgw/rgw_main: Added compat header for TEMP_FAILURE_RETRY

Reviewed-by: Sage Weil <sage@redhat.com>
2015-10-18 21:04:51 -04:00
John Coyle
c40754bdb5 compat: use prefixed typeof to support stricter environments
Signed-off-by: John Coyle <dx9err@gmail.com>
2015-10-18 15:27:15 -04:00
Sage Weil
08b381e2fc Merge pull request #5219 from ceph/wip-12315-libs-compat-conditional
ceph.spec.in: fix libs-compat / devel-compat conditional

Reviewed-by: Nathan Cutler <ncutler@suse.com>
2015-10-18 14:34:47 -04:00
Sage Weil
f771d4e186 Merge pull request #5917 from caibo2014/fix-tool-makefile
tools:remove duplicate references

Reviewed-by: Sage Weil <sage@redhat.com>
2015-10-18 14:33:32 -04:00
Sage Weil
54745c4c95 Merge pull request #6290 from ceph/wip-rocksdb
rocksdb: use native rocksdb makefile (and our autotools)

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-10-18 08:36:21 -04:00
Sage Weil
abde0343ef rocksdb: 4.1
Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-17 15:56:18 -04:00
Sage Weil
ba0d2c333d rocksdb: build rocksdb with its own Makefile
This lets us track upstream without mantaining our own autotools fork.

Move back to rocksdb vanilla 3.11.2 (without our autotools patches).

Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-17 15:56:18 -04:00
Sage Weil
c1e44293d5 Makefile: link libos.a statically (no .la)
Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-17 15:55:30 -04:00
Sage Weil
e8614f8978 Makefile: link mon statically (not .la)
Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-17 15:39:03 -04:00
Sage Weil
f86fbdb735 Makefile: make libosd.a static (not .la)
We don't dynamically link the osd.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-17 15:39:03 -04:00
Sage Weil
e10301b518 librados_test_stub: add missing headers
Signed-off-by: Sage Weil <sage@redhat.com>
2015-10-17 15:39:03 -04:00
Loic Dachary
8b0f59331a Merge pull request #6272 from zhouyuan/fix_cache_tier_doc
doc: fix outdated content in cache tier

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-10-17 00:12:05 +02:00
John Coyle
c5600207fb rgw/rgw_main: Added compat header for TEMP_FAILURE_RETRY
Signed-off-by: John Coyle dx9err@gmail.com
2015-10-16 13:38:39 -04:00
Sage Weil
63d868106e Merge remote-tracking branch 'gh/infernalis' 2015-10-16 09:49:09 -04:00
Josh Durgin
28131505b8 Merge pull request #6249 from dillaman/wip-13274-infernalis
LTTng-UST tracing should be dynamically enabled

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-10-15 18:07:09 -04:00
John Coyle
b15c541d8b libcephfs: only check file offset on glibc platforms
Signed-off-by: John Coyle dx9err@gmail.com
2015-10-15 16:10:30 -04:00
Josh Durgin
bc6b8b0091 Merge pull request #6284 from dillaman/wip-13483-infernalis
qa: remove legacy OS support from rbd/qemu-iotests

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-10-15 14:43:11 -04:00