|
|
Subscribe / Log in / New account

Re: [RFC/PATCH] Add preadv and pwritev system calls.

From:  Christoph Hellwig <hch-AT-infradead.org>
To:  Gerd Hoffmann <kraxel-AT-redhat.com>
Subject:  Re: [RFC/PATCH] Add preadv and pwritev system calls.
Date:  Thu, 11 Dec 2008 18:49:08 -0500
Message-ID:  <20081211234908.GA11305@infradead.org>
Cc:  lkml - Kernel Mailing List <linux-kernel-AT-vger.kernel.org>
Archive‑link:  Article

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 post comments


Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds