mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] 2.4.4 linearize UDP RPC requests using GFP_KERNEL...
Date: Fri, 11 May 2001 10:58:30 +0200	[thread overview]
Message-ID: <15099.43446.132871.699151@charged.uio.no> (raw)


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;


             reply	other threads:[~2001-05-11  8:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-11  8:58 Trond Myklebust [this message]
2001-05-11  9:41 ` David S. Miller

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=15099.43446.132871.699151@charged.uio.no \
    --to=trond.myklebust@fys.uio.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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

all inboxes | Powered by JetHome®