[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <465DE2BB.2060608@cosmosbay.com>
Date: Wed, 30 May 2007 22:46:51 +0200
From: Eric Dumazet <dada1@...mosbay.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
CC: Mark Lord <lkml@....ca>, Ingo Molnar <mingo@...e.hu>,
Jeff Garzik <jeff@...zik.org>,
Zach Brown <zach.brown@...cle.com>,
linux-kernel@...r.kernel.org,
Arjan van de Ven <arjan@...radead.org>,
Christoph Hellwig <hch@...radead.org>,
Andrew Morton <akpm@....com.au>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Ulrich Drepper <drepper@...hat.com>,
Evgeniy Polyakov <johnpol@....mipt.ru>,
"David S. Miller" <davem@...emloft.net>,
Suparna Bhattacharya <suparna@...ibm.com>,
Davide Libenzi <davidel@...ilserver.org>,
Jens Axboe <jens.axboe@...cle.com>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: Syslets, Threadlets, generic AIO support, v6
Linus Torvalds a écrit :
>
> On Wed, 30 May 2007, Eric Dumazet wrote:
>> So yes, reimplement sendfile() should help to find last splice() bugs, and as
>> a bonus it could add non blocking disk io, (O_NONBLOCK on input file ->
>> socket)
>
> Well, to get those kinds of advantages, you'd have to use splice directly,
> since sendfile() hasn't supported nonblocking disk IO, and the interface
> doesn't really allow for it.
sendfile() interface doesnt allow it, but if you open("somediskfile", O_RDONLY
| O_NONBLOCK), then splice() based sendfile() can perform a non blocking disk
io, (while starting an io with readahead)
I actually use this trick myself :)
(splice(disk -> pipe, NONBLOCK), splice(pipe -> worker))
non blocking disk io, + zero copy :)
>
> In fact, since nonblocking accesses require also some *polling* method,
> and we don't have that for files, I suspect the best option for those
> things is to simply mix AIO and splice(). AIO tends to be the right thing
> for disk waits (read: short, often cached), and if we can improve AIO
> performance for the cached accesses (which is exactly what the threadlets
> should hopefully allow us to do), I would seriously suggest going that
> route.
>
> But the pure "use splice to _implement_ sendfile()" thing is worth doing
> for all the other reasons, even if nonblocking file access is not likely
> one of them.
>
> Linus
>
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists