SUNRPC: add list of idle threads
authorNeilBrown <neilb@suse.de>
Mon, 11 Sep 2023 14:39:11 +0000 (10:39 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 16 Oct 2023 16:44:04 +0000 (12:44 -0400)
commit5ff817b23534dd3942f881ab01dd5050505517aa
tree68645765fa9aa791b5ccd0f39dc687ab2d1b8b6e
parentfa341560ca7458f4396d5a0771cb5f2358d8535d
SUNRPC: add list of idle threads

Rather than searching a list of threads to find an idle one, having a
list of idle threads allows an idle thread to be found immediately.

This adds some spin_lock calls which is not ideal, but as the hold-time
is tiny it is still faster than searching a list.  A future patch will
remove them using llist.h.  This involves some subtlety and so is left
to a separate patch.

This removes the need for the RQ_BUSY flag.  The rqst is "busy"
precisely when it is not on the "idle" list.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
include/linux/sunrpc/svc.h
include/trace/events/sunrpc.h
net/sunrpc/svc.c
net/sunrpc/svc_xprt.c