summaryrefslogtreecommitdiff
path: root/fs/lockd
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2026-01-06 13:59:48 -0500
committerChuck Lever <chuck.lever@oracle.com>2026-01-28 10:15:42 -0500
commita0022a38be1017fb302563eaee54ff904be48cea (patch)
treef5b991fb1f10a501d3b64be128e9e65d7711b27d /fs/lockd
parent7f221b340d16558919d963a2afed585d6a145fa4 (diff)
downloadlwn-a0022a38be1017fb302563eaee54ff904be48cea.tar.gz
lwn-a0022a38be1017fb302563eaee54ff904be48cea.zip
sunrpc: allow svc_recv() to return -ETIMEDOUT and -EBUSY
To dynamically adjust the thread count, nfsd requires some information about how busy things are. Change svc_recv() to take a timeout value, and then allow the wait for work to time out if it's set. If a timeout is not defined, then the schedule will be set to MAX_SCHEDULE_TIMEOUT. If the task waits for the full timeout, then have it return -ETIMEDOUT to the caller. If it wakes up, finds that there is more work and that no threads are available, then attempt to set SP_TASK_STARTING. If wasn't already set, have the task return -EBUSY to cue to the caller that the service could use more threads. Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/svc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index e2a1b12272f5..dcd80c4e74c9 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -141,7 +141,7 @@ lockd(void *vrqstp)
*/
while (!svc_thread_should_stop(rqstp)) {
nlmsvc_retry_blocked(rqstp);
- svc_recv(rqstp);
+ svc_recv(rqstp, 0);
}
if (nlmsvc_ops)
nlmsvc_invalidate_all();