aio_mlock(2) system call
Konstantin Belousov
kostikbel at gmail.com
Mon Jun 3 16:13:03 UTC 2013
On Mon, Jun 03, 2013 at 02:06:18PM +0400, Gleb Smirnoff wrote:
> Hello!
>
> This patch brings a new system call - aio_mlock(2). The idea is
> quite clear from its name: it performs mlock(2), which can take
> a long time if pages aren't resident, under aio(4) control.
>
> The patch is quite simple, and non-desctructive. Here it is
> for your review.
>
> If no one objects, I'd like to add it to FreeBSD 10.
I suggest to rename the aio_process() to aio_process_rw().
Also, it might make sense to assert aio_lio_opcode value on the entry
to aio_process_*() functions.
> +static void
> +aio_process_mlock(struct aiocblist *aiocbe)
> +{
> + struct aiocb *cb = &aiocbe->uaiocb;
> + int error;
> +
> + error = vm_mlock(aiocbe->userproc, aiocbe->cred,
> + (void *)(uintptr_t)cb->aio_buf, cb->aio_nbytes);
This probably should be spelled __DEVOLATILE().
We traditionally do not reuse the gaps in the syscall table, but add
new syscalls at the end.
Did you tested the kqueue completion notifications with the aio_mlock() ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20130603/ddf3ae11/attachment.sig>
More information about the freebsd-arch
mailing list