mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Jeff Garzik <jeff@garzik.org>
Cc: Chuck Lever <chuck.lever@oracle.com>,
	Trond Myklebust <Trond.Myklebust@netapp.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	NeilBrown <neilb@suse.de>, Adrian Bunk <bunk@stusta.de>
Subject: Re: [bisect] NFS regression breaks X
Date: Wed, 9 May 2007 14:51:55 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.0.98.0705091440461.4062@woody.linux-foundation.org> (raw)
In-Reply-To: <46423D62.2070200@garzik.org>



On Wed, 9 May 2007, Jeff Garzik wrote:
> 
> I love bisect :)

Yeah, me too.

> bisect has identified the following commit as the one that
> causes my GNOME login to die, within 10 seconds of logging in:
> 
> 	commit 2bea90d43a050bbc4021d44e59beb34f384438db

Ok, that commit looks nice in many ways, so I'd be loathe to revert it 
entirely.

Can you try it with this patch that re-introduces the "total overkill" 
slack calculations, and probably makes them even worse (there's a few 
left-shifts added, and now it will left-shift the extra slacktoo).

But there are also some unexplained changes in that patch, so maybe the 
size allocation isn't the big problem. For example, now "call_allocate()" 
will set task->tk_status to zero which is totally strange.

But if it's the allocation that is too small, this patch may help.

Trond, Chuck?

		Linus

--
 net/sunrpc/clnt.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index d8fbee4..5b78692 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -738,6 +738,8 @@ call_reserveresult(struct rpc_task *task)
 	rpc_exit(task, status);
 }
 
+#define RPC_SLACK_SPACE		(1024u)	/* apparently NOT total overkill */
+
 /*
  * 2.	Allocate the buffer. For details, see sched.c:rpc_malloc.
  *	(Note: buffer memory is freed in xprt_release).
@@ -745,7 +747,7 @@ call_reserveresult(struct rpc_task *task)
 static void
 call_allocate(struct rpc_task *task)
 {
-	unsigned int slack = task->tk_auth->au_cslack;
+	unsigned int slack;
 	struct rpc_rqst *req = task->tk_rqstp;
 	struct rpc_xprt *xprt = task->tk_xprt;
 	struct rpc_procinfo *proc = task->tk_msg.rpc_proc;
@@ -764,6 +766,9 @@ call_allocate(struct rpc_task *task)
 			BUG_ON(proc->p_replen == 0);
 	}
 
+	/* Apparently not total overkill */
+	slack =  max(task->tk_auth->au_cslack, RPC_SLACK_SPACE);
+
 	/*
 	 * Calculate the size (in quads) of the RPC call
 	 * and reply headers, and convert both values

  reply	other threads:[~2007-05-09 22:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-09 21:30 Jeff Garzik
2007-05-09 21:51 ` Linus Torvalds [this message]
2007-05-09 22:17   ` Trond Myklebust
2007-05-09 22:48   ` Jeff Garzik
2007-05-09 22:03 ` Trond Myklebust
2007-05-09 22:52   ` Andrew Morton
2007-05-10  0:10     ` Trond Myklebust
2007-05-10 13:36       ` Chuck Lever
2007-05-11 22:54       ` Jeff Garzik

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=alpine.LFD.0.98.0705091440461.4062@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=Trond.Myklebust@netapp.com \
    --cc=akpm@linux-foundation.org \
    --cc=bunk@stusta.de \
    --cc=chuck.lever@oracle.com \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    /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®