|| ||Christoph Hellwig <hch-AT-infradead.org>|
|| ||Gerd Hoffmann <kraxel-AT-redhat.com>|
|| ||Re: [RFC/PATCH] Add preadv and pwritev system calls.|
|| ||Thu, 11 Dec 2008 18:49:08 -0500|
|| ||lkml - Kernel Mailing List <linux-kernel-AT-vger.kernel.org>|
On Fri, Dec 12, 2008 at 12:13:43AM +0100, Gerd Hoffmann wrote:
> 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 post comments)