From: Adam Kupczyk Date: Mon, 25 Jan 2021 10:45:06 +0000 (+0100) Subject: common/mempool: Modify shard selection function X-Git-Tag: v16.2.0~114^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F39977%2Fhead;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 a18f6a502daa..c03aa175cfa0 100644 --- a/src/include/mempool.h +++ b/src/include/mempool.h @@ -259,7 +259,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; }