mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] 2.4.4 linearize UDP RPC requests using GFP_KERNEL...
@ 2001-05-11  8:58 Trond Myklebust
  2001-05-11  9:41 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Trond Myklebust @ 2001-05-11  8:58 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel


Hi,

  The zero-copy TCP patch that was integrated in 2.4.4 has allowed us
to move the task of reassembling of the fragments into one buffer
until we're out of the ->data_ready() bottom half context.
  In 2.4.4 therefore, the nfsd thread can end up calling the function
skb_linearize(), in order to allocate a new buffer and copy over the
fragments.

  IMHO allocating the buffer using GFP_ATOMIC is a mistake. As I said
we're in a thread context, so sleeping in GFP_KERNEL is safe. In
addition, the cost of dropping the request if we can't allocate the
buffer is heavy in that the client has to wait for a timeout, and then
retry.

I'd therefore like to propose the following change.

Cheers,
  Trond

--- linux-2.4.4/net/sunrpc/svcsock.c.orig	Fri Apr 27 23:15:01 2001
+++ linux-2.4.4/net/sunrpc/svcsock.c	Fri May 11 10:08:36 2001
@@ -383,7 +383,7 @@
 
 	/* Sorry. */
 	if (skb_is_nonlinear(skb)) {
-		if (skb_linearize(skb, GFP_ATOMIC) != 0) {
+		if (skb_linearize(skb, GFP_KERNEL) != 0) {
 			kfree_skb(skb);
 			svc_sock_received(svsk, 0);
 			return 0;


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

* Re: [PATCH] 2.4.4 linearize UDP RPC requests using GFP_KERNEL...
  2001-05-11  8:58 [PATCH] 2.4.4 linearize UDP RPC requests using GFP_KERNEL Trond Myklebust
@ 2001-05-11  9:41 ` David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2001-05-11  9:41 UTC (permalink / raw)
  To: trond.myklebust; +Cc: Linus Torvalds, Linux Kernel


Trond Myklebust writes:
 >   IMHO allocating the buffer using GFP_ATOMIC is a mistake. As I said
 > we're in a thread context, so sleeping in GFP_KERNEL is safe. In
 > addition, the cost of dropping the request if we can't allocate the
 > buffer is heavy in that the client has to wait for a timeout, and then
 > retry.
 > 
 > I'd therefore like to propose the following change.
 ...
 > --- linux-2.4.4/net/sunrpc/svcsock.c.orig	Fri Apr 27 23:15:01 2001
 > +++ linux-2.4.4/net/sunrpc/svcsock.c	Fri May 11 10:08:36 2001
 ...
 > -		if (skb_linearize(skb, GFP_ATOMIC) != 0) {
 > +		if (skb_linearize(skb, GFP_KERNEL) != 0) {

No arguments here.

Later,
David S. Miller
davem@redhat.com

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

end of thread, other threads:[~2001-05-11  9:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-11  8:58 [PATCH] 2.4.4 linearize UDP RPC requests using GFP_KERNEL Trond Myklebust
2001-05-11  9:41 ` David S. Miller

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®