Because below here we haven't called mempool_thread.init() yet,
and call to mempool_thread.shutdown() will therefore raise an assert instead.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Shrinking a clone which has snapshots and does not share
majority of objects with its parent (i.e., there are less
objects to be copied up) involves huge number of object
map updates -- two (pre, post) per object. This results
in lots of requests to be send to OSDs especially when
trimming a gigantus image. This situation can be optimized
by sending batch ObjectMap updates for an object range
thereby significantly cutting down OSD traffic resulting
in faster trim times.
Fixes: http://tracker.ceph.com/issues/17356
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Adds three new options:
--feature-list will list monmap features, as well as available
features.
--feature-set sets a feature on the monmap
--feature-unset unsets a feature on the monmap
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
Purpose: allow a dev to test certain portions of the monitors on-the-fly
that would otherwise be nearly impossible without requiring shutting
them off.
Description:
Currently we are adding support to debug monitors on-the-fly via the
ceph tool cli, via the admin socket.
An initial attempt was made to make this interface available via
over-the-network ceph cli, but that would require a quorum to exist,
or significant changes to be made to the handling of commands to allow
this interface to be an exception to the rule.
Therefore, this interface will live on the admin sockets for the time
being; potentially forever, because the jury is still out on whether
there's added value making this available via any other medium that's
not the admin socket.
The work means to test the newly added monmap features. This new
interface will allow one to set, unset and list supported features.
This will make it easier to implement functional tests for the
features themselves, for quorum features that are expected to be set
on-quorum, as well as to test upgrade paths from version A to version
B.
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
Instead of keeping several maps mapping back and forth from string to
entity_addr_t for each monitor, have the monitor's address and name in
purpose-specific class, mon_info_t, and everything references it
instead.
Although the benefits may not be obvious right now, it will allow us to
add other ip addresses for the monitors a bit more easily, instead of
having to kludge around the existing structures.
We also keep compatibility with older versions by maintaining the
traditional 'mon_addr' map. This is a logical change inside the monitor,
so we can easily accomodate older monitors without having to rely on
quorum features; just needs a bit of care and foo.
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
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>