From: Sridhar Samudrala <[EMAIL PROTECTED]>
Date: Tue, 08 Aug 2006 10:19:51 -0700

> We cannot do this as xs_sendpages() doesn't like to use sendpage()
> with highmem pages and has the following check before making the
> actual call.
>                 /* Hmm... We might be dealing with highmem pages */
>                 if (PageHighMem(*ppage))
>                         sendpage = sock_no_sendpage;
>                 err = sendpage(sock, *ppage, base, len, flags);

The question is why doesn't it "like" highmem pages?

The kernel socket operation will handle highmem pages just fine and in
fact this sock_no_sendpage bit in xs_sendpages() has a negative
performance impact when it does trigger.

What's more this code is even worse than it appears at first, because
it will use sock_no_sendpage for _every_ page after the first highmem
one it sees.

I tried to figure out the origin of this highmem test.  It comes from
before all this code was moved from net/sunrpc/xdr.c into
net/sunrpc/xprtsock.c

Looking further in history, it even predates GIT :)

So I went through the pre-GIT history and it shows that this test was
there from the very beginning when xdr_sendpage and zerocopy sunrpc
support was added.

Trond, I think the highmem check in xs_sendpages() is completely
bogus, do you mind if we remove it? :-)

The socket layer will properly check the device to make sure it
can handle highmem pages, and if not it will copy the data into
a low-mem page as-needed.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to