Re: [bisect] NFS regression breaks X

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux