common/shared_cache.hpp: avoid list::size()

Signed-off-by: Samuel Just <sam.just@inktank.com>
common/shared_cache.hpp: compact to a single lookup where possible

Signed-off-by: Samuel Just <sam.just@inktank.com>
Throttler: optionally disable use of perfcounters

These can be expensive enough that we want to disable them. We're already
mostly set up for it to be optional, so just plug in a config option and
move a timestamp read under the "if (logger)" guard to set it up!

Signed-off-by: Greg Farnum <greg@inktank.com>
Throttle: Turn off throttle based on max bytes

If max throttle bytes is 0, throttle should not be doing anything.
This check is introduced in the beginning of each throttle function

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
TrackedOp: optionally disable the actual tracking operations

To avoid op contention on global locks, optionally disable the
op tracking. Create an "osd_op_tracker" config to control it, then
in the OpTracker constructor set a bool. If it's set, the OpTracker
doesn't actually maintain its lists and avoids taking any locks. We
maintain the within-op tracking for now since it shouldn't contend,
but we can turn that off later on if we like.

Signed-off-by: Greg Farnum <greg@inktank.com>
cmp.h: boost tuple comparison is replaced by regular comparison

Profiler was showing this boost tuple comparison is expensive.
So, it is replaced by regular comparison.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
Pipe, cephx: Message signing under config option

The config option was present earlier but the option is checked
not in the beginning, so, it was doing some stuff. Now the config
option guard is at the very beginning of the function.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
client: use 64-bit value in sync read eof logic

The file size can jump to a value that is very much larger than our current
position (for example, it could be a disk image file that gets a sparse
write at a large offset).  Use a 64-bit value so that 'some' doesn't
overflow.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: John Spray <john.spray@inktank.com>
v0.76
Merge branch 'next'
Merge pull request #1151 from ceph/wip-performance-configs

Performance improvements and config options

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Merge pull request #1179 from dachary/wip-force-proposal

mon: do not force proposal when no osds

Backport: emperor, dumpling
Reviewed-by: Sage Weil <sage@inktank.com>
erasure-code: the plugin is in a convenience library

So that it can be used by mon without linking with libosd

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: add crush ruleset creation API

Because only the erasure code plugin knows enough to create a ruleset
that is best suited for a given set of parameters.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: implement example create_ruleset

And the associated unit tests.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: implement ErasureCodeJerasure::create_ruleset

It is based on CrushWrapper::add_simple_ruleset, using a "default" root
and "host" failure domain by default. They can be overridden with
erasure-code parameters ( erasure-code-ruleset-root and
erasure-code-ruleset-failure-domain respectively ).

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: test ErasureCodeJerasure::create_ruleset

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
mon: helper for pool properties parsing

Add the prepare_pool_properties to convert the properties vector into a
properties map suitable for either initializing the pg_pool_t member or
an erasure code plugin.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
mon: no default ruleset except for replicated pools

Remove the hardcoded default ruleset for erasure coded pools and only
keep it for replicated pools. Move the logic up in the  prepare_new_pool
method so that an error code can be returned before allocating the new
pending pool in case the ruleset is not initialized.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
mon: pool creation helper for size

The size of the replicated pools are by default set to
osd_pool_default_size but it may vary depending on the pool type. Create
a helper to compute the pool size.

http://tracker.ceph.com/issues/7277 refs #7277

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>