From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: linux-kernel@vger.kernel.org
Subject: Re: NFS client errors with 2.5.74?
Date: Thu, 10 Jul 2003 12:15:24 +0200 [thread overview]
Message-ID: <16141.15548.109496.967464@charged.uio.no> (raw)
In-Reply-To: <20030710060744.GA27308@mail.jlokier.co.uk>
>>>>> " " == Jamie Lokier <jamie@shareable.org> writes:
> - Every so often, the client's kernel log gets:
> kernel: nfs: server 192.168.1.1 not responding, timed out
Sigh... I hate soft mounts... Have I said that before? 8-)
> Any idea about this? Is it a known problem?
I can never guarantee you perfect service with soft mounts (a 5 second
network patition/server congestion is all it takes) but I do have a
patch that just went into 2.4.22 that backs out some of the
Van Jacobson exponential backoff changes. This helps stabilize things
a lot.
I haven't yet had time to port that patch to 2.5.x, but the code
should be pretty much identical, so if you want to give it a go, then
here it is...
Cheers,
Trond
diff -u --recursive --new-file linux-2.4.21-20-rdplus/net/sunrpc/clnt.c linux-2.4.21-21-soft/net/sunrpc/clnt.c
--- linux-2.4.21-20-rdplus/net/sunrpc/clnt.c 2003-06-15 14:49:35.000000000 -0700
+++ linux-2.4.21-21-soft/net/sunrpc/clnt.c 2003-06-17 10:38:56.000000000 -0700
@@ -709,14 +709,14 @@
dprintk("RPC: %4d call_timeout (major)\n", task->tk_pid);
if (clnt->cl_softrtry) {
- if (clnt->cl_chatty && !task->tk_exit)
+ if (clnt->cl_chatty)
printk(KERN_NOTICE "%s: server %s not responding, timed out\n",
clnt->cl_protname, clnt->cl_server);
rpc_exit(task, -EIO);
return;
}
- if (clnt->cl_chatty && !(task->tk_flags & RPC_CALL_MAJORSEEN) && rpc_ntimeo(&clnt->cl_rtt) > 7) {
+ if (clnt->cl_chatty && !(task->tk_flags & RPC_CALL_MAJORSEEN)) {
task->tk_flags |= RPC_CALL_MAJORSEEN;
printk(KERN_NOTICE "%s: server %s not responding, still trying\n",
clnt->cl_protname, clnt->cl_server);
diff -u --recursive --new-file linux-2.4.21-20-rdplus/net/sunrpc/xprt.c linux-2.4.21-21-soft/net/sunrpc/xprt.c
--- linux-2.4.21-20-rdplus/net/sunrpc/xprt.c 2003-06-15 15:14:14.000000000 -0700
+++ linux-2.4.21-21-soft/net/sunrpc/xprt.c 2003-06-17 09:48:18.000000000 -0700
@@ -1046,21 +1046,6 @@
}
/*
- * Exponential backoff for UDP retries
- */
-static inline int
-xprt_expbackoff(struct rpc_task *task, struct rpc_rqst *req)
-{
- int backoff;
-
- req->rq_ntimeo++;
- backoff = min(rpc_ntimeo(&task->tk_client->cl_rtt), XPRT_MAX_BACKOFF);
- if (req->rq_ntimeo < (1 << backoff))
- return 1;
- return 0;
-}
-
-/*
* RPC receive timeout handler.
*/
static void
@@ -1073,14 +1058,7 @@
if (req->rq_received)
goto out;
- if (!xprt->nocong) {
- if (xprt_expbackoff(task, req)) {
- rpc_add_timer(task, xprt_timer);
- goto out_unlock;
- }
- rpc_inc_timeo(&task->tk_client->cl_rtt);
- xprt_adjust_cwnd(req->rq_xprt, -ETIMEDOUT);
- }
+ xprt_adjust_cwnd(req->rq_xprt, -ETIMEDOUT);
req->rq_nresend++;
dprintk("RPC: %4d xprt_timer (%s request)\n",
@@ -1090,7 +1068,6 @@
out:
task->tk_timeout = 0;
rpc_wake_up_task(task);
-out_unlock:
spin_unlock(&xprt->sock_lock);
}
@@ -1228,16 +1205,17 @@
return;
out_receive:
dprintk("RPC: %4d xmit complete\n", task->tk_pid);
+ spin_lock_bh(&xprt->sock_lock);
/* Set the task's receive timeout value */
if (!xprt->nocong) {
task->tk_timeout = rpc_calc_rto(&clnt->cl_rtt,
rpcproc_timer(clnt, task->tk_msg.rpc_proc));
- req->rq_ntimeo = 0;
+ task->tk_timeout <<= clnt->cl_timeout.to_retries
+ - req->rq_timeout.to_retries;
if (task->tk_timeout > req->rq_timeout.to_maxval)
task->tk_timeout = req->rq_timeout.to_maxval;
} else
task->tk_timeout = req->rq_timeout.to_current;
- spin_lock_bh(&xprt->sock_lock);
/* Don't race with disconnect */
if (!xprt_connected(xprt))
task->tk_status = -ENOTCONN;
next prev parent reply other threads:[~2003-07-10 10:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-10 5:41 Jamie Lokier
2003-07-10 6:07 ` Jamie Lokier
2003-07-10 10:15 ` Trond Myklebust [this message]
2003-07-10 16:14 ` Frank Cusack
2003-07-10 9:25 ` Felipe Alfaro Solana
2003-07-10 10:30 Michael Frank
[not found] <20030710053944.GA27038@mail.jlokier.co.uk>
[not found] ` <16141.15245.367725.364913@charged.uio.no>
2003-07-10 15:04 ` Jamie Lokier
[not found] ` <20030710150012.GA29113@mail.jlokier.co.uk>
[not found] ` <16141.32852.39625.891724@charged.uio.no>
2003-07-10 15:35 ` Jamie Lokier
2003-07-10 15:45 ` Trond Myklebust
2003-07-10 23:36 ` Trond Myklebust
2003-07-12 15:13 ` Jamie Lokier
2003-07-13 13:23 ` Jamie Lokier
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=16141.15548.109496.967464@charged.uio.no \
--to=trond.myklebust@fys.uio.no \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®