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>
SimpleMessenger: Don't grab the lock when sending messages if we don't have to

We'd like it if sending a message didn't require any global locks, but the
submit_message() function conditionally needs it in order to create new
Pipes. So:
1) Add an "already_locked" param to submit_message; if it is false
and we need to set up a new Pipe we grab (and drop) the lock locally.
2) Have the Connection-based interface set this param to false, and
the addr-based interface set it to true.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Signed-off-by: Greg Farnum <greg@inktank.com>