linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH [0/3] NFSD: drop TCP connections when NFSv4 client enters courtesy state
@ 2024-04-22 21:31 Dai Ngo
  2024-04-22 21:31 ` [PATCH 1/3] NFSD: mark cl_cb_state as NFSD4_CB_DOWN if cl_cb_client is NULL Dai Ngo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dai Ngo @ 2024-04-22 21:31 UTC (permalink / raw)
  To: chuck.lever, jlayton; +Cc: linux-nfs

When a v4.0 client enters courtesy state all its v4 states remain valid
and its fore and back channel TCP connection remained in ESTABLISHED
state until the TCP keep-alive mechanism timed out and shuts down the
back channel connection. The fore channel connection remains in ESTABLISHED
state between 6 - 12 minutes before the NFSv4 server's 6-minute idle timer
(svc_age_temp_xprts) shuts down the idle connection.

Since NFSv4.1 mount uses the same TCP connection for both fore and back
channel connection there is no TCP keep-alive packet sent from the server
to the client. The server's idle timer does not shutdown an idle v4.1
connection since the svc_xprt->xpt_ref is more than 1:  1 for sv_tempsocks
list, one for the session's nfsd4_conn and 1 for the back channel.
 
To conserve system resources in large configuration where there are lots
of idle clients, this patch series drop the fore and back channel connection
of NFSv4 client as soon as it enters the courtesy state. The fore and back
channel connections are automatically re-established when the courtesy
client reconnects.

 fs/nfsd/nfs4callback.c | 14 ++++++++++++--
 fs/nfsd/nfs4state.c    | 26 +++++++++++++++++++++++++-
 fs/nfsd/state.h        |  2 ++
 3 files changed, 39 insertions(+), 3 deletions(-)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-22 21:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-22 21:31 PATCH [0/3] NFSD: drop TCP connections when NFSv4 client enters courtesy state Dai Ngo
2024-04-22 21:31 ` [PATCH 1/3] NFSD: mark cl_cb_state as NFSD4_CB_DOWN if cl_cb_client is NULL Dai Ngo
2024-04-22 21:31 ` [PATCH 2/3] NFSD: add helper to set NFSD4_CLIENT_CB_KILL to stop the callback Dai Ngo
2024-04-22 21:31 ` [PATCH 3/3] NFSD: drop TCP connections when NFSv4 client enters courtesy state Dai Ngo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).