Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Jun 2013 19:12:55 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Gleb Smirnoff <glebius@FreeBSD.org>
Cc:        arch@FreeBSD.org
Subject:   Re: aio_mlock(2) system call
Message-ID:  <20130603161255.GM3047@kib.kiev.ua>
In-Reply-To: <20130603100618.GH67170@FreeBSD.org>
References:  <20130603100618.GH67170@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--jwY/bXrd6avG4scw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jun 03, 2013 at 02:06:18PM +0400, Gleb Smirnoff wrote:
>   Hello!
>=20
>   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.
>=20
>   The patch is quite simple, and non-desctructive. Here it is
> for your review.
>=20
>   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 =3D &aiocbe->uaiocb;
> +	int error;
> +
> +	error =3D 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() ?

--jwY/bXrd6avG4scw
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (FreeBSD)

iQIcBAEBAgAGBQJRrMCHAAoJEJDCuSvBvK1BgWAQAIybpSeMlA5tMd8xEfWodRzN
jmF62DI9uh+ThrTHQ7cB0FXIZtvCEbWFMbvHNKo9Z9lE53Pld9QnQ3Y8xe7ccZ7Q
OUWbdQbwlQ+B+bzjuGwciYaASdSJSiUHhUb32prDd2p1umRc0fGeeihb8PBEO6jM
TLzAA0tK5UrcJvS7DgfQan2JdJlrjxrtyItvHuxUlhS8gnESACrD2WtenC6SlHrv
gEpMohQKrQjCK9FPd1/s2k4aj25bsIB2LTJVoXrbmabP9/Mh1daaXbLWTMXf6BgY
wyxhbXMmiAsqPDo2anggWi8YwN742nuWawEZGm7LxhCcEvqraCpFQQk2g3KOHA9l
mSzYRIxCNImTpDzLCqHsgvjNqjT36VNGc/fY8VB6GfSAO28OIp7vatnFF4qL9m+P
H/cH6uNmp0PHqpztoOUxZ3ykT4N/hxYHSH+wvUvJ8bK0PHGOGti26EraNYnH3WyJ
8IbMocB97olBC81yhpJN7kBOon/78NzPvA9Ymz6YdQUcpTzSnT+GKSpHQ5jrMgqP
qiwMuzvoJhmJR2d+c/zJYwDrXYN75+U7xQyp2ghUOkg2yKE4HF1+g2ZFcHbw29xN
HHDk/IWC4KcVjnJM/hZ2r4O+jL2U6d7F74oBq9WZstyHy6Y6KluTKzDmTcuL2JZG
hM99hqXEZu4iZsQdxJ9o
=n7ol
-----END PGP SIGNATURE-----

--jwY/bXrd6avG4scw--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130603161255.GM3047>