lkml.org 
[lkml]   [2008]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC/PATCH] Add preadv and pwritev system calls.
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?



\
 
 \ /
  Last update: 2008-12-12 00:51    [W:0.078 / U:0.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site