From: Adam Kupczyk Date: Mon, 25 Jan 2021 10:45:06 +0000 (+0100) Subject: common/mempool: Modify shard selection function X-Git-Tag: v14.2.17~19^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d7efce1b3b6cd8160c4f26f4f1dfa9d0d65a47d4;p=ceph.git common/mempool: Modify shard selection function Modify shard selection function, so no longer all threads use the same shard 0. Signed-off-by: Adam Kupczyk (cherry picked from commit fccbdc0905e3868666fbb10803bac6b73f687cb1) --- diff --git a/src/include/mempool.h b/src/include/mempool.h index c4b0086c106c0..9cee38256ea66 100644 --- a/src/include/mempool.h +++ b/src/include/mempool.h @@ -258,7 +258,7 @@ public: // Dirt cheap, see: // https://fossies.org/dox/glibc-2.32/pthread__self_8c_source.html size_t me = (size_t)pthread_self(); - size_t i = (me >> 3) & ((1 << num_shard_bits) - 1); + size_t i = (me >> 12) & ((1 << num_shard_bits) - 1); return i; }