Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758594AbXE3ULK (ORCPT ); Wed, 30 May 2007 16:11:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756088AbXE3UK4 (ORCPT ); Wed, 30 May 2007 16:10:56 -0400 Received: from gw1.cosmosbay.com ([86.65.150.130]:33328 "EHLO gw1.cosmosbay.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753418AbXE3UK4 (ORCPT ); Wed, 30 May 2007 16:10:56 -0400 Message-ID: <465DD97D.9010807@cosmosbay.com> Date: Wed, 30 May 2007 22:07:25 +0200 From: Eric Dumazet User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Linus Torvalds CC: Mark Lord , Ingo Molnar , Jeff Garzik , Zach Brown , linux-kernel@vger.kernel.org, Arjan van de Ven , Christoph Hellwig , Andrew Morton , Alan Cox , Ulrich Drepper , Evgeniy Polyakov , "David S. Miller" , Suparna Bhattacharya , Davide Libenzi , Jens Axboe , Thomas Gleixner Subject: Re: Syslets, Threadlets, generic AIO support, v6 References: <20070529212718.GH7875@mami.zabbo.net> <465CA654.5000505@garzik.org> <20070530072055.GA3077@elte.hu> <465D43A0.8040307@garzik.org> <20070530160913.GA14261@elte.hu> <465DCAE4.1010206@rtr.ca> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.6 (gw1.cosmosbay.com [86.65.150.130]); Wed, 30 May 2007 22:07:32 +0200 (CEST) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1203 Lines: 30 Linus Torvalds a ?crit : > > On Wed, 30 May 2007, Mark Lord wrote: >> I wonder how useful it would be to reimplement sendfile() >> using splice(), either in glibc or inside the kernel itself? > > I'd like that, if only because right now we have two separate paths that > kind of do the same thing, and splice really is the only one that is > generic. > > I thought Jens even had some experimental patches for it. It might be > worth to "just do it" - there's some internal overhead, but on the other > hand, it's also likely the best way to make sure any issues get sorted > out. > Last time I played with splice(), I found a bug with readahead logic, most probably because nobody but me tried it before. (corrected by Fengguang Wu in commit 9ae9d68cbf3fe0ec17c17c9ecaa2188ffb854a66 ) 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) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/