All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Naulls <peter@chocky.org>
To: linux-kernel@vger.kernel.org
Subject: Re: Linux 2.6.17-rc2
Date: Wed, 19 Apr 2006 15:19:02 -0700	[thread overview]
Message-ID: <4446B756.7080102@chocky.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0604191433390.3701@g5.osdl.org>

Linus Torvalds wrote:
> 
> On Wed, 19 Apr 2006, Trond Myklebust wrote:
>> Any chance this could be adapted to work with all those DMA (and RDMA)
>> engines that litter our motherboards? I'm thinking in particular of
>> stuff like the drm drivers, and userspace rdma.
> 
> Absolutely. Especially with "vmsplice()" (the not-yet-implemented "move 
> these user pages into a kernel buffer") it should be entirely possible to 
> set up an efficient zero-copy setup that does NOT have any of the problems 
> with aio and TLB shootdown etc.
> 
> Note that a driver would have to support the splice_in() and splice_out() 
> interfaces (which are basically just given the pipe buffers to do with as 
> they wish), and perhaps more importantly: note that you need specialized 
> apps that actually use splice() to do this.
> 
> That's the biggest downside by far, and is why I'm not 100% convinced 
> splice() usage will be all that wide-spread. If you look at sendfile(), 
> it's been available for a long time, and is actually even almost portable 
> across different OS's _and_ it is easy to use. But almost nobody actually 
> does. I suspect the only users are some apache mods, perhaps a ftp deamon 
> or two, and probably samba. And that's probably largely it.

I am.  I'm developing a distributed file system responsible for
transferring GBs of files around a network.  The biggest problem here
with the traditional send/recv/poll that was in use was heavy duty
CPU usage.  Maxing out the gigabit network eats about 60% CPU.  In
some simple experiments, sendfile reduced that to 10% or less 
(depending, there's a lot of variation in stuff that goes on).

One big problem I had is that sendfile is not symmetric (for quite
understable reasons), but that meant the overlying file system API
(it's a userspace library) has to undergo various changes to make
effective use of sendfile.  Doing so in a sensible manner proved
tricky, but not impossible

Anyway, CPU usage is still a big deal, which is why I'm interested
in these new zero-copy calls I've just caught up on the discussion
about.  And if I decide to use them, that means moving a whole
load of machines to 2.6.17 - some of which will be running 2.6.12
for at least a little while longer.  I guess I might be asking
for the opposite of this:

> So I'd expect this to be most useful for perhaps things like some HPC 
> apps, where you can have specialized libraries for data communication. And 
> servers, of course (but they might just continue to use the old 
> "sendfile()" interface, without even knowing that it's not sendfile() any 
> more, but just a wrapper around splice()).

i.e, a splice emulation, that happens to use sendfile when it can.

I very much appreciate the conceptual improvements that splice has
over sendfile, but can anyone give some examples significant CPU
savings that would not be possible using sendfile?










  reply	other threads:[~2006-04-19 22:18 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-19  3:27 Linux 2.6.17-rc2 Linus Torvalds
2006-04-19  7:30 ` [patch, 2.6.17-rc2] dm: fix typo Ingo Molnar
2006-04-19  7:33   ` Ingo Molnar
2006-04-19 18:00 ` Linux 2.6.17-rc2 Diego Calleja
2006-04-19 18:04   ` Hua Zhong
2006-04-19 19:40     ` splice and tee [was Linux 2.6.17-rc2] Jonathan Corbet
2006-04-19 18:44   ` Linux 2.6.17-rc2 Linus Torvalds
2006-04-19 19:20     ` Grzegorz Kulewski
2006-04-19 20:09       ` Linus Torvalds
2006-04-19 21:23     ` Trond Myklebust
2006-04-19 21:49       ` Linus Torvalds
2006-04-19 22:19         ` Peter Naulls [this message]
2006-04-20 13:21     ` Diego Calleja
2006-04-20 14:50     ` Jens Axboe
2006-04-20 15:32       ` Linus Torvalds
2006-04-20 19:19         ` Jens Axboe
2006-04-20 18:40       ` Linh Dang
2006-04-20 19:49         ` Jens Axboe
2006-04-20 19:57           ` Linh Dang
2006-04-20 20:02             ` Nick Piggin
2006-04-21  7:53               ` Jens Axboe
2006-04-20 20:08             ` Jens Axboe
2006-04-20 19:26       ` David S. Miller
2006-04-20 19:34         ` Jens Axboe
2006-04-20 19:39           ` David S. Miller
2006-04-20 19:44             ` Jens Axboe
2006-04-20 19:54               ` Nick Piggin
2006-04-20 21:37           ` Piet Delaney
2006-04-20 22:20             ` Linus Torvalds
2006-04-20 23:39               ` Piet Delaney
2006-04-21  0:09                 ` Linus Torvalds
2006-04-20 23:26                   ` David Lang
2006-04-21  0:49                     ` David S. Miller
2006-04-22  4:52                 ` Troy Benjegerdes
2006-04-21  0:41               ` David S. Miller
2006-04-21 17:58               ` Linus Torvalds
2006-04-21 18:15                 ` Steven Rostedt
2006-04-21 18:42                   ` Steven Rostedt
2006-04-21  0:20             ` David S. Miller
2006-04-21  2:05             ` Andi Kleen
2006-04-21  6:47               ` Piet Delaney
2006-04-20 16:24     ` Ingo Oeser
2006-04-20 19:52     ` splice(), vmsplice() niftiness [was: Re: Linux 2.6.17-rc2] bjd
2006-04-21 10:21 ` Linux 2.6.17-rc2 Alistair John Strachan
2006-04-21 16:40   ` Linus Torvalds
2006-04-21 17:21     ` Stephen Rothwell
2006-04-21 22:02     ` Andi Kleen
2006-04-22  0:53       ` Alistair John Strachan
2006-04-22  1:07         ` Andi Kleen
2006-04-22 13:21           ` Alistair John Strachan
2006-04-21 11:01 ` Linux 2.6.17-rc2 - notifier chain problem? Herbert Poetzl
2006-04-21 21:31   ` Chandra Seetharaman
2006-04-22  0:58     ` Herbert Poetzl
2006-04-24 21:26       ` Chandra Seetharaman
2006-04-24 22:03         ` Andrew Morton
2006-04-24 23:01           ` Chandra Seetharaman
2006-04-24 23:28             ` Andrew Morton
2006-04-25  0:19               ` Chandra Seetharaman
2006-04-26 15:49               ` Alan Stern
2006-04-26 18:18                 ` Chandra Seetharaman
2006-04-26 18:43                   ` Andrew Morton
2006-04-26 19:29                     ` Ashok Raj
2006-04-26 20:21                       ` Chandra Seetharaman
2006-04-26 20:26                         ` Ashok Raj
2006-04-28 23:12                           ` Chandra Seetharaman
2006-04-28 23:23                             ` Andrew Morton
2006-04-28 23:33                               ` Linus Torvalds
2006-04-28 23:48                                 ` Chandra Seetharaman
2006-04-28 23:43                               ` Chandra Seetharaman
2006-04-29 15:30                                 ` Alan Stern
2006-04-22  6:40   ` Keith Owens
     [not found] <63bym-4wt-3@gated-at.bofh.it>
     [not found] ` <64eE4-1gP-15@gated-at.bofh.it>
     [not found]   ` <64eX5-1RE-13@gated-at.bofh.it>
     [not found]     ` <64wre-2cg-35@gated-at.bofh.it>
2006-04-24  4:42       ` Linux 2.6.17-rc2 Robert Hancock
2006-04-24 13:08         ` Alistair John Strachan

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=4446B756.7080102@chocky.org \
    --to=peter@chocky.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.