From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Garzik Subject: Re: [PATCH 1/3 v2] chunkd: remove sendfile(2) zero-copy support Date: Sun, 18 Jul 2010 19:10:09 -0400 Message-ID: <4C4389D1.6000201@garzik.org> References: <20100717054616.GA9993@havoc.gtf.org> <20100717054651.GA10037@havoc.gtf.org> <4C4278EA.8000605@redhat.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=Ejd6MR4wYHvbLjx34O9gOt98KrRc3yqBDxX/4mltmgA=; b=PkQVfozuhD52ZKrEUH2jbn9mFGZVbUvpQM7xroDuYAFWNVShUer8Ctpeg/9h4YnSla pRiaijr3wFhwwhR6WWWLxUTt71s9V/iOTwqAv5yIJFcVGsiYBEkGxq0Jn737ywjr0OB4 RqTdr9j1GJHY4iqmFBepSI6IfE1ftz+VoYek0= In-Reply-To: <4C4278EA.8000605@redhat.com> Sender: hail-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Steven Dake Cc: hail-devel@vger.kernel.org On 07/17/2010 11:45 PM, Steven Dake wrote: > On 07/16/2010 10:46 PM, Jeff Garzik wrote: >> chunkd: remove sendfile(2) zero-copy support >> >> chunkd will be soon checksumming data in main memory. That removes >> the utility of a zero-copy interface which bypasses the on-heap >> data requirement. >> >> Signed-off-by: Jeff Garzik > May be able to use vmsplice with sendfile (if linux is only target > platform). Haven't tried it myself, but the operations look interesting > at achieving zero copy with sockets from memory addresses. Even though the man pages say "only for pipes", this syscall definitely works with TCP. The big question: is it actually faster than read()+write() ? Years ago, I experimented with using some fancy new Linux-specific syscalls in a from-scratch implementation of cp(1). It turned out that read()+write() was faster than other methods. That was file->file copying. It's probably worth investigating vmsplice() for our file->checksum->TCP case, definitely. Jeff