diff mbox series

[v2,2/5] NFSD: Shorten CB_OFFLOAD response to NFS4ERR_DELAY

Message ID 20250301183151.11362-3-cel@kernel.org (mailing list archive)
State Under Review
Delegated to: Chuck Lever
Headers show
Series Implement referring call lists for CB_OFFLOAD | expand

Commit Message

Chuck Lever March 1, 2025, 6:31 p.m. UTC
From: Chuck Lever <chuck.lever@oracle.com>

Try not to prolong the wait for completion of a COPY or COPY_NOTIFY
operation.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 fs/nfsd/nfs4proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeff Layton March 3, 2025, 5:45 p.m. UTC | #1
On Sat, 2025-03-01 at 13:31 -0500, cel@kernel.org wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
> 
> Try not to prolong the wait for completion of a COPY or COPY_NOTIFY
> operation.
> 
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
>  fs/nfsd/nfs4proc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
> index 9a0e68aa246f..3431b695882d 100644
> --- a/fs/nfsd/nfs4proc.c
> +++ b/fs/nfsd/nfs4proc.c
> @@ -1712,7 +1712,7 @@ static int nfsd4_cb_offload_done(struct nfsd4_callback *cb,
>  	switch (task->tk_status) {
>  	case -NFS4ERR_DELAY:
>  		if (cbo->co_retries--) {
> -			rpc_delay(task, 1 * HZ);
> +			rpc_delay(task, HZ / 5);
>  			return 0;
>  		}
>  	}

This is fine for now.

What I think we probably ought to do for all the callbacks is implement
a sliding delay window, and handle it in the common rpc_call_done
handling code.
diff mbox series

Patch

diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 9a0e68aa246f..3431b695882d 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -1712,7 +1712,7 @@  static int nfsd4_cb_offload_done(struct nfsd4_callback *cb,
 	switch (task->tk_status) {
 	case -NFS4ERR_DELAY:
 		if (cbo->co_retries--) {
-			rpc_delay(task, 1 * HZ);
+			rpc_delay(task, HZ / 5);
 			return 0;
 		}
 	}