Thread (33 messages) 33 messages, 4 authors, 2018-03-22

Re: [PATCH 8/9] aio: implement io_pgetevents

From: Greg KH <gregkh@linuxfoundation.org>
Date: 2018-03-21 09:24:46
Also in: linux-fsdevel, lkml

On Wed, Mar 21, 2018 at 08:32:31AM +0100, Christoph Hellwig wrote:
This is the io_getevents equivalent of ppoll/pselect and allows to
properly mix signals and aio completions (especially with IOCB_CMD_POLL)
and atomically executes the following sequence:

	sigset_t origmask;

	pthread_sigmask(SIG_SETMASK, &sigmask, &origmask);
	ret = io_getevents(ctx, min_nr, nr, events, timeout);
	pthread_sigmask(SIG_SETMASK, &origmask, NULL);

Note that unlike many other signal related calls we do not pass a sigmask
size, as that would get us to 7 arguments, which aren't easily supported
by the syscall infrastructure.  It seems a lot less painful to just add a
new syscall variant in the unlikely case we're going to increase the
sigset size.
Do we have a manpage for this new syscall and maybe a test program for
it so we can exercise it as part of the kselftests?

And do we really need a compat thunk for a new syscall?  Ugh, I guess
it's needed due to the long mess, right?  No way to just define it the
same way for both arch sizes?

Anyway, the code seems sane to me:

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help