The compiler/linker guarantee this is initialized before any invocation
of this function... even if it is by a ctor in another compilation unit
that is initialized by the mempool.cc compilation unit.
Suggested by Bartłomiej Święcki <bartlomiej.swiecki@corp.ovh.com>
Signed-off-by: Allen Samuels <allen.samuels@sandisk.com>
e.g., mempool::bluestore_meta_other::list<...> ...
This avoids colliding with other names and types when the pool
name is something common (like "osd").
Signed-off-by: Sage Weil <sage@redhat.com>
# Conflicts:
# src/include/mempool.h
We want these to get their debug flag adjusted when it is turned
on and off.
(In contrast, we accept that STL containers will only be debugged
if mempool debug was on when they are constructed.)
Signed-off-by: Sage Weil <sage@redhat.com>
Assume that the array will be zeroed when the process starts, and
avoid the possibility that it will be zeroed *again* when the
ctors run for this link module (potentially clobbering values
that have been filled in by other ctors who ran earlier than
ours).
Signed-off-by: Sage Weil <sage@redhat.com>
This avoids having to use statics for the pool_allocators and
guessing what intenral types the containers are going to need.
It'll be a bit slower in debug on on construction and destruction,
but who cares!
Signed-off-by: Sage Weil <sage@redhat.com>
If we have a static choice of shard for every *type*
(pool_allocator_base_t) then we will hammer that shard from all
threads and play cacheline ping-pong. Instead, move the types
list to pool_t (there aren't that many anyway) and pick a shard
on every allocate/deallocate call.
Signed-off-by: Sage Weil <sage@redhat.com>
Trim cache based on overall memory utilization by cache objects,
as tracked by the bluestore_meta_* mempools. This lets you
configure the bluestore cache size in terms of bytes of memory.
Note that we do not account for other memory utilization by the
OSD.
Signed-off-by: Sage Weil <sage@redhat.com>
Keep onodes separate so we can use onodes as a sentinal for
overall memory usage (this is what we trim in terms of anyway).
Signed-off-by: Sage Weil <sage@redhat.com>
test_subman.sh: Don't use --tmpdir since on most Linux-is it is consideren default
when creating a directory:
`If TEMPLATE is not specified, use tmp.XXXXXXXXXX, and --tmpdir is implied.`
And on FreeBSD --tmpdir is not available anyways.
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
they are not referencing any symbols from it. and also the tests testing
plugins are not linked against the ec plugins, they *depend* on them.
Signed-off-by: Kefu Chai <kchai@redhat.com>
This is needed to compile against the c++ api since
c38869232c3c852d98fa1826632db360c5a6afd4
Fixes: http://tracker.ceph.com/issues/17654
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
rgw: frontend subsystem rework
all requested changes have been made by the author
tested by-hand w/sigv2 and sigv4, and already passed teuthology rgw suite