Date: Fri, 7 Dec 2007 13:47:25 +0200 From: "Vlad GALU" <dudu@dudu.ro> To: "Ivan Voras" <ivoras@freebsd.org> Cc: freebsd-fs@freebsd.org Subject: Re: readv: parallel or sequential? Message-ID: <ad79ad6b0712070347s4a5d5bb2rc7adfdc54b107dac@mail.gmail.com> In-Reply-To: <fjbb3v$n60$1@ger.gmane.org> References: <fjbb3v$n60$1@ger.gmane.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 12/7/07, Ivan Voras <ivoras@freebsd.org> 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!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ad79ad6b0712070347s4a5d5bb2rc7adfdc54b107dac>
