linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: trond.myklebust@netapp.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 02/10] NFS: Slow down state manager after an unhandled error
Date: Fri, 14 Sep 2012 17:23:23 -0400	[thread overview]
Message-ID: <20120914212323.1635.78058.stgit@degas.1015granger.net> (raw)
In-Reply-To: <20120914211053.1635.74063.stgit@degas.1015granger.net>

If the state manager thread is not actually able to fully recover from
some situation, it wakes up waiters, who kick off a new state manager
thread.  Quite often the fresh invocation of the state manager is just
as successful.

This results in a livelock as the client dumps thousands of NFS
requests a second on the network in a vain attempt to recover.  Not
very friendly.

To mitigate this situation, add a delay in the state manager after
an unhandled error, so that the client sends just a few requests
every second in this case.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 fs/nfs/nfs4state.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 55148de..d6e0d63 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -2008,6 +2008,7 @@ out_error:
 	pr_warn_ratelimited("NFS: state manager%s%s failed on NFSv4 server %s"
 			" with error %d\n", section_sep, section,
 			clp->cl_hostname, -status);
+	ssleep(1);
 	nfs4_end_drain_session(clp);
 	nfs4_clear_state_manager_bit(clp);
 }


  parent reply	other threads:[~2012-09-14 21:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14 21:23 [PATCH 00/10] 3.7 candidates Chuck Lever
2012-09-14 21:23 ` [PATCH 01/10] NFS: nfs_parsed_mount_options can use unsigned int Chuck Lever
2012-09-14 21:23 ` Chuck Lever [this message]
2012-09-14 21:23 ` [PATCH 03/10] SUNRPC: Clean up dprintk messages in rpc_pipe.c Chuck Lever
2012-09-14 21:23 ` [PATCH 04/10] SUNRPC: Use __func__ in dprintk() in auth_gss.c Chuck Lever
2012-09-14 21:23 ` [PATCH 05/10] SUNRPC: Refactor rpc_clone_client() Chuck Lever
2012-09-14 21:24 ` [PATCH 06/10] SUNRPC: Introduce rpc_clone_client_set_auth() Chuck Lever
2012-09-14 21:24 ` [PATCH 07/10] NFS: Introduce "migration" mount option Chuck Lever
2012-09-14 21:24 ` [PATCH 08/10] NFS: Use the same nfs_client_id4 for every server Chuck Lever
2012-09-14 21:24 ` [PATCH 09/10] NFS: Discover NFSv4 server trunking when mounting Chuck Lever
2012-09-14 21:24 ` [PATCH 10/10] NFS: Add nfs4_unique_id boot parameter Chuck Lever

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120914212323.1635.78058.stgit@degas.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@netapp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).