summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/svc_xprt.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2023-09-11 16:39:17 +0200
committerChuck Lever <chuck.lever@oracle.com>2023-10-16 18:44:05 +0200
commit2b65a226840c0e86db0e7926856a0a017b3390f2 (patch)
treec42cc925b269cbb967f04c9e13afad60a8dddc8e /net/sunrpc/svc_xprt.c
parentSUNRPC: add list of idle threads (diff)
downloadlinux-2b65a226840c0e86db0e7926856a0a017b3390f2.tar.xz
linux-2b65a226840c0e86db0e7926856a0a017b3390f2.zip
SUNRPC: discard SP_CONGESTED
We can tell if a pool is congested by checking if the idle list is empty. We don't need a separate flag. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'net/sunrpc/svc_xprt.c')
-rw-r--r--net/sunrpc/svc_xprt.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index ebfeeb504a79..fa0d854a5596 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -735,8 +735,6 @@ static void svc_rqst_wait_for_work(struct svc_rqst *rqstp)
if (rqst_should_sleep(rqstp)) {
set_current_state(TASK_IDLE);
- smp_mb__before_atomic();
- clear_bit(SP_CONGESTED, &pool->sp_flags);
spin_lock_bh(&pool->sp_lock);
list_add(&rqstp->rq_idle, &pool->sp_idle_threads);
spin_unlock_bh(&pool->sp_lock);
@@ -874,7 +872,7 @@ void svc_recv(struct svc_rqst *rqstp)
/* Normally we will wait up to 5 seconds for any required
* cache information to be provided.
*/
- if (!test_bit(SP_CONGESTED, &pool->sp_flags))
+ if (!list_empty(&pool->sp_idle_threads))
rqstp->rq_chandle.thread_wait = 5 * HZ;
else
rqstp->rq_chandle.thread_wait = 1 * HZ;