mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Patrick J. LoPresti" <lopresti@gmail.com>
To: Bryan Donlan <bdonlan@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: sendfile() expert advice sought
Date: Wed, 17 Feb 2010 18:47:07 -0800	[thread overview]
Message-ID: <23986fd91002171847l749e71eh6a71259b1ff0a2df@mail.gmail.com> (raw)
In-Reply-To: <3e8340491002171819h4d63d592ube70f327eb92d798@mail.gmail.com>

On Wed, Feb 17, 2010 at 6:19 PM, Bryan Donlan <bdonlan@gmail.com> wrote:
>
> sendfile() always copies pages

Really?  So the description in the following article (see "Figure 4") is wrong?

http://www.linuxjournal.com/article/6345?page=0,1

(To be clear, I want to replace the step where the kernel buffers get
populated from disk with a step where I populate them programatically.
 That is what I mean by "sendfile() for anonymous pages".)

According to that article, among others, if your network device
supports scatter/gather and the pages are already resident, then
sendfile() is a true zero-copy operation.  That is, it takes page
cache pages and arranges to DMA them to the network card without
creating any additional copies in system RAM.

My questions make a lot more sense if that is how it works, anyway :-).

 - Pat

      reply	other threads:[~2010-02-18  2:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-16 19:53 Patrick J. LoPresti
2010-02-18  0:57 ` Robert Hancock
2010-02-18  2:19 ` Bryan Donlan
2010-02-18  2:47   ` Patrick J. LoPresti [this message]

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=23986fd91002171847l749e71eh6a71259b1ff0a2df@mail.gmail.com \
    --to=lopresti@gmail.com \
    --cc=bdonlan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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®