From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 11 18:33:47 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE463EE7; Mon, 11 Aug 2014 18:33:47 +0000 (UTC) Received: from mail-la0-x22c.google.com (mail-la0-x22c.google.com [IPv6:2a00:1450:4010:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E9DC720E9; Mon, 11 Aug 2014 18:33:46 +0000 (UTC) Received: by mail-la0-f44.google.com with SMTP id el20so6050066lab.31 for ; Mon, 11 Aug 2014 11:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=4/5zt2GTbKbVuKLODqs4Bv2l3caFYJ5EN42s6rgMN+o=; b=slwQ+8v2nLX0e7+wMxiSn8HukEcKv9iHdiYaOju7fSMMFdJ/LRoH4LgFSJu4TbY91U sX07QZx4DfygjiX6lk7HD7Vyvza6vY5UQHSLFwg6RrYX9et1xKxETTbb3D66OEsUEcRa ImaX0oZ/wRCXPBKACYJ7TZr6oUCBEK2aX000r7NSkKp8hYZofdEJh4KKx/gyPpm0Fqr9 AZLCkxUfIAAX8kEzJHhP37ARvzuDw+98J82hse3pnaqRy4zpDYt3Ba2YVTMWjZEk5zPS uTtR8PpCsppcizIz9UeBGqDS8/OqjfXfGNaGSDxoil9jH47T/sOO7JQwPphXSqV3AypM Zk5g== MIME-Version: 1.0 X-Received: by 10.152.4.97 with SMTP id j1mr40456799laj.10.1407782024772; Mon, 11 Aug 2014 11:33:44 -0700 (PDT) Sender: rizzo.unipi@gmail.com Received: by 10.114.244.2 with HTTP; Mon, 11 Aug 2014 11:33:44 -0700 (PDT) In-Reply-To: References: <1407171616.44440.YahooMailBasic@web181702.mail.ne1.yahoo.com> <20140811082610.GF7828@equilibrium.bsdes.net> Date: Mon, 11 Aug 2014 20:33:44 +0200 X-Google-Sender-Auth: tcqBeofrz_JgCIzznU1_ysS2IRw Message-ID: Subject: Re: Support for zero copy sockets From: Luigi Rizzo To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: Victor Balada Diaz , Sushanth Rai , "freebsd-hackers@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 18:33:47 -0000 On Monday, August 11, 2014, Adrian Chadd wrote: > On 11 August 2014 01:26, Victor Balada Diaz > wrote: > > On Mon, Aug 04, 2014 at 10:00:16AM -0700, Sushanth Rai via > freebsd-hackers wrote: > >> Hello, > >> > >> FreeBSD 10 release sources doesn't seem to have zero copy socket code > anymore. What's is alternative to do zero_copy ? > >> > >> Thanks, > >> Sushanth > > > > You need to use sendfile(2). In the man page is stated that the > implementation in FreeBSD > > is zero copy. > > > > You can also check: > > > > http://svnweb.freebsd.org/base?view=revision&revision=255608 > > > > I'd like to reintroduce a zero copy socket IO method for at least > write that doesn't rely on sendfile. > > The zero-copy socket page flipping thing was interesting because IIRC > tried to work for both sending and receiving socket data. Doing that > via an API would be nicer. > > So, if people have an idea for how it could be done / what the API > looks like then I'm all ears. > > What concerns me is how expensive it is to do the page flipping and tlb invalidation. Not saying that it cannot work, but isn't there a large set of constraints to make it worthwhile ? Cheers Luigi > > > -a > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org > " > -- -----------------------------------------+------------------------------- Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL +39-050-2211611 . via Diotisalvi 2 Mobile +39-338-6809875 . 56122 PISA (Italy) -----------------------------------------+-------------------------------