From owner-freebsd-fs@FreeBSD.ORG Fri Dec 7 12:12:39 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 10EE416A420 for ; Fri, 7 Dec 2007 12:12:39 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.235]) by mx1.freebsd.org (Postfix) with ESMTP id CE2C413C4CC for ; Fri, 7 Dec 2007 12:12:38 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: by nz-out-0506.google.com with SMTP id l8so190977nzf for ; Fri, 07 Dec 2007 04:12:38 -0800 (PST) Received: by 10.142.214.5 with SMTP id m5mr2078467wfg.1197028045435; Fri, 07 Dec 2007 03:47:25 -0800 (PST) Received: by 10.143.12.4 with HTTP; Fri, 7 Dec 2007 03:47:25 -0800 (PST) Message-ID: Date: Fri, 7 Dec 2007 13:47:25 +0200 From: "Vlad GALU" To: "Ivan Voras" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: 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 12:12:39 -0000 On 12/7/07, Ivan Voras wrote: > Hi, > > I found this in readv(2): > > For readv() and preadv(), the iovec structure is defined as: > > struct iovec { > void *iov_base; /* Base address. */ > size_t iov_len; /* Length. */ > }; > > Each iovec entry specifies the base address and length of an area > in mem- > ory where data should be placed. The readv() system call will always > fill an area completely before proceeding to the next. > > Does this mean that, in effect, readv() is just a loop of read() calls > (minus syscall overhead)? > read() is just a particular case of readv() (with only one iovec struct, plus the full buffer size), they both call kern_readv(), so the effect is the same. I assume the manpage means that the iovec structures are filled sequentially rather than in parallel. > > -- Mahnahmahnah!