Date: Tue, 4 Jun 2013 01:29:13 +0400 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: arch@FreeBSD.org Subject: Re: aio_mlock(2) system call Message-ID: <20130603212913.GU67170@glebius.int.ru> In-Reply-To: <20130603161255.GM3047@kib.kiev.ua> References: <20130603100618.GH67170@FreeBSD.org> <20130603161255.GM3047@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 03, 2013 at 07:12:55PM +0300, Konstantin Belousov wrote: K> On Mon, Jun 03, 2013 at 02:06:18PM +0400, Gleb Smirnoff wrote: K> > Hello! K> > K> > This patch brings a new system call - aio_mlock(2). The idea is K> > quite clear from its name: it performs mlock(2), which can take K> > a long time if pages aren't resident, under aio(4) control. K> > K> > The patch is quite simple, and non-desctructive. Here it is K> > for your review. K> > K> > If no one objects, I'd like to add it to FreeBSD 10. K> K> I suggest to rename the aio_process() to aio_process_rw(). K> Also, it might make sense to assert aio_lio_opcode value on the entry K> to aio_process_*() functions. Will do. K> > +static void K> > +aio_process_mlock(struct aiocblist *aiocbe) K> > +{ K> > + struct aiocb *cb = &aiocbe->uaiocb; K> > + int error; K> > + K> > + error = vm_mlock(aiocbe->userproc, aiocbe->cred, K> > + (void *)(uintptr_t)cb->aio_buf, cb->aio_nbytes); K> This probably should be spelled __DEVOLATILE(). K> K> We traditionally do not reuse the gaps in the syscall table, but add K> new syscalls at the end. Hmm. I did that because I wanted to be all aio_* grouped together. Why not? K> Did you tested the kqueue completion notifications with the aio_mlock() ? Sure. This is my main use case here. -- Totus tuus, Glebius.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130603212913.GU67170>