From owner-freebsd-fs@FreeBSD.ORG Fri Dec 7 13:21:41 2007 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BF9416A46E; Fri, 7 Dec 2007 13:21:41 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 4C3D513C45D; Fri, 7 Dec 2007 13:21:41 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 8F41517105; Fri, 7 Dec 2007 13:21:39 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.1/8.14.1) with ESMTP id lB7DLcb4005180; Fri, 7 Dec 2007 13:21:39 GMT (envelope-from phk@critter.freebsd.dk) To: Ivan Voras From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 07 Dec 2007 14:22:22 +0100." Date: Fri, 07 Dec 2007 13:21:38 +0000 Message-ID: <5179.1197033698@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: freebsd-fs@freebsd.org Subject: Re: readv: parallel or sequential? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Dec 2007 13:21:41 -0000 In message , Ivan Voras writes: >This is an OpenPGP/MIME signed message (RFC 2440 and 3156) >--------------enig09F7468F9E992596CC57A5F2 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: quoted-printable > >Dag-Erling Sm=C3=B8rgrav wrote: > >> But to return to what Ivan was asking, I think what the man page is >> trying to say is that you can't use readv() to e.g. read individual >> network packets into separate buffers (unless each packet just happens >> to fit exactly within each buffer). > >What about streaming protocols like TCP? If, for example, I know I have >a N-byte header, N2-byte body, couldn't readv handle it with two iovecs? yes. >But that's not why I started the discussion. I'm looking for a way to do >"scattered" async IO on files (the intention: feed an array of offsets, >lengths and buffers into the kernel, let it perform the requests in >parallel, if it can) and started with this man page. You want AIO -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.