Re: [RFC/PATCH] Add preadv and pwritev system calls.
From: Christoph Hellwig
Date: Thu Dec 11 2008 - 18:49:20 EST
On Fri, Dec 12, 2008 at 12:13:43AM +0100, Gerd Hoffmann wrote:
> Hi,
>
> The attached patch adds preadv and pwritev system calls. These syscalls
> are a pretty straightforward combination of pread and readv (same for
> write). They are quite useful for doing vectored I/O in threaded
> applications. Using lseek+readv instead opens race windows you'll have
> to plug with locking.
>
> Other systems have such system calls too, for example NetBSD, check
> here: http://www.daemon-systems.org/man/preadv.2.html
>
> The patch sports the actual system call implementation and the windup in
> the x86 system call tables. Other archs are TBD.
>
> Comments? Reviews? Suggestions? Flames?
Looks good, but you should Cc linux-arch so that arch maintainers get
a heads up to wire up the syscalls.
> + if (ret > 0)
> + add_rchar(current, ret);
> + inc_syscr(current);
> + return ret;
Could it be that these are missing for the compat case both for the existing
readv/writev and your new syscalls?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/