netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: sri@us.ibm.com
Cc: netdev@vger.kernel.org, trond.myklebust@fys.uio.no
Subject: Re: [PATCH RESEND 2/2] update sunrpc to use in-kernel sockets API
Date: Tue, 08 Aug 2006 17:09:41 -0700 (PDT)	[thread overview]
Message-ID: <20060808.170941.71164303.davem@davemloft.net> (raw)
In-Reply-To: <1155057591.26188.5.camel@w-sridhar2.beaverton.ibm.com>

From: Sridhar Samudrala <sri@us.ibm.com>
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.

  reply	other threads:[~2006-08-09  0:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-07 23:00 [PATCH RESEND 2/2] update sunrpc to use in-kernel sockets API Sridhar Samudrala
2006-08-08  3:59 ` David Miller
2006-08-08 17:19   ` Sridhar Samudrala
2006-08-09  0:09     ` David Miller [this message]
2006-08-09  3:16       ` Trond Myklebust
2006-08-09 17:34         ` Sridhar Samudrala
2006-08-10  0:03           ` David 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=20060808.170941.71164303.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sri@us.ibm.com \
    --cc=trond.myklebust@fys.uio.no \
    /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;
as well as URLs for NNTP newsgroup(s).