Whamcloud - gitweb
LU-11454 ptlrpc: Make CPU binding switchable 62/33262/6
authorPatrick Farrell <paf@cray.com>
Thu, 4 Oct 2018 12:10:11 +0000 (07:10 -0500)
committerOleg Drokin <green@whamcloud.com>
Fri, 12 Oct 2018 23:50:27 +0000 (23:50 +0000)
commit3eb7a1dfc3e7401ebcc45ccb116ed673607fd27f
treef7505c99237e752b12adead45d73a1e01f549fbc
parente734d9e803443139ccb160bbd4eae05ecc9627e5
LU-11454 ptlrpc: Make CPU binding switchable

LU-6325 added CPT binding to the ptlrpc worker threads on
the servers.  This is often desirable, especially where
NUMA latencies are high, but it is not always beneficial.

If NUMA latencies are low, there is little benefit, and
sometimes it can be quite costly:

In particular, if NID-CPT hashing with routers leads to an
unbalanced workload by CPT, it is easy to end up in a
situation where the CPUs in one CPT are maxed out but
others are idle.

To this end, we add module parameters to allow disabling
the strict binding behavior, allowing threads to use all
CPUs.

This is complicated a bit because we still want separate
service partitions - The existing "no affinity" behavior
places all service threads in a single service partition,
which gives only one queue for service wakeups.

So we separate binding behavior from CPT association,
allowing us to keep multiple service partitions where
desired.

Module parameters are added to ldlm, mdt, and ost, of the
form "servicename_cpu_bind", such as "mds_rdpg_cpu_bind".

Setting them to "0" will disable the strict CPU binding
behavior for the threads in that service.

Parameters were not added for certain minor services which
do not have any CPT affinity/binding behavior today.  (This
appears to be because they are not expected to be
performance sensitive.)

cray-bug-id: LUS-6518
Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I1f6f9bb7a11da3a3eec7fc14c41d09ed27700f46
Reviewed-on: https://review.whamcloud.com/33262
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_net.h
lustre/ldlm/ldlm_lockd.c
lustre/mdt/mdt_mds.c
lustre/ost/ost_handler.c
lustre/ptlrpc/service.c