summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-07-10 19:42:00 +0300
committerChuck Lever <chuck.lever@oracle.com>2023-08-30 00:45:22 +0300
commit850bac3ae4a636e9e6bb8de62fe697ac171cb221 (patch)
tree722d1f3c68cda3971e5d6d774985467b887df69b /tools/perf/scripts/python/export-to-postgresql.py
parent82e5d82a45741839bd9dcb6636cfcf67747a5af5 (diff)
downloadlinux-850bac3ae4a636e9e6bb8de62fe697ac171cb221.tar.xz
SUNRPC: Deduplicate thread wake-up code
Refactor: Extract the loop that finds an idle service thread from svc_xprt_enqueue() and svc_wake_up(). Both functions do just about the same thing. Note that svc_wake_up() currently does not hold the RCU read lock while waking the target thread. It indeed should hold the lock, just as svc_xprt_enqueue() does, to ensure the rqstp does not vanish during the wake-up. This patch adds the RCU lock for svc_wake_up(). Note that shrinking the pool thread count is rare, and calls to svc_wake_up() are also quite infrequent. In practice, this race is very unlikely to be hit, so we are not marking the lock fix for stable backport at this time. Reviewed-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions