[lkml]   [2001]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] 2.4.4 linearize UDP RPC requests using GFP_KERNEL...


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

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

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
@@ -383,7 +383,7 @@

/* Sorry. */
if (skb_is_nonlinear(skb)) {
- if (skb_linearize(skb, GFP_ATOMIC) != 0) {
+ if (skb_linearize(skb, GFP_KERNEL) != 0) {
svc_sock_received(svsk, 0);
return 0;
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:0.098 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site