Whamcloud - gitweb
LU-17054 lnet: use GFP_KERNEL for alloc w/o spinlock 96/53596/5
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 4 Jan 2024 21:32:13 +0000 (14:32 -0700)
committerOleg Drokin <green@whamcloud.com>
Thu, 18 Jan 2024 06:17:31 +0000 (06:17 +0000)
commit9c1deba3846437268f2053860bafed2cd6a9b791
tree08afe715d216b7ea74a549527ebf89512b9349ec
parentd36abfd08925855482583a9bbec95462bc5d1946
LU-17054 lnet: use GFP_KERNEL for alloc w/o spinlock

Do not use genradix_ptr_alloc(GFP_ATOMIC) when not allocating
under a spinlock in lnet_cpt_of_nid_show_start(), since this
puts unnecessary strain on the atomic memory pools.  This
function grabs mutex_lock(&the_lnet.ln_api_mutex) so the caller
cannot be holding a spinlock at the time.

Fix minor code style issues in this function.

Fixes: 466e25a6a3 ("LU-17054 lnet: Change cpt-of-nid to get result from kernel")
Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I091959940bffadc380bff9329bb83e8b099ed63f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53596
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/api-ni.c