Le mar 23/08/2005 à 11:56, Jakub Jelinek a écrit : > On Tue, Aug 23, 2005 at 01:14:38PM +0530, Suparna Bhattacharya wrote: > > > 2. No support for propagating IO completion events to user space > > threads using RT signals. User threads need to poll the completion > > queue using io_getevents. POSIX specifies that when an AIO > > request completes, a signal can be delivered to the application > > to indicate the completion of the IO. > > POSIX AIO needs to handle SIGEV_NONE, SIGEV_SIGNAL and SIGEV_THREAD > notification. Obviously kernel shouldn't create threads for SIGEV_THREAD > itself, as kernel shouldn't hardcode all the implementation details how a > thread can be created. But it would be good if AIO signalling e.g. handled > both SIGEV_SIGNAL and SIGEV_SIGNAL | SIGEV_THREAD_ID, with the same usage as > e.g. timer_* syscalls. If kernel makes sure SI_ASYNCIO si_code is set in > the notification signal siginfos, glibc could even use just one helper > thread for timer_*/[al]io_* and maybe in the future other SIGEV_THREAD notification. > See chapter "2.2. AIO completion event". The libposix-aio written by Sébastien and I manages all these cases: http://www.bullopensource.org/posix/ There is a patch allowing kernel to send signal to a given process on aio event completion: http://cvs.sourceforge.net/viewcvs.py/paiol/kernel-patches/2.6.12/aioevent.patch?rev=1.1.1.1&view=auto With the help of an helper thread in the user space, the libposix-aio is able to manage SIGEV_THREAD and create new thread by using user space code (and thus implementation dependent calls): http://cvs.sourceforge.net/viewcvs.py/paiol/libposix-aio/src/aio_read.c?view=markup http://cvs.sourceforge.net/viewcvs.py/paiol/libposix-aio/src/aio_thread_create.c?view=markup Sébastien wrote this part of libposix-aio (So I'm not an expert on this part :-P ), but I think his helper thread is made like the glibc timer helper thread is made. And thus, if we want to merge libposix-aio in glibc, we should use existing mechanism, and it should be easy to put POSIX AIO helper thread portions inside the timer helper thread. But only the glibc maintainer can answer to this question: should we mixe timer and AIO code ? Laurent -- ------------------ Laurent Vivier ------------------- mailto:[email protected] BULL/FREC:B1-226 phone: (+33) 476 29 7213 Bullcom: 229-7213 ------------------[ DT/OSwR&D/AIX ]------------------ http://www.bullopensource.org/ext4
Attachment:
signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e=2E?=
- References:
- Linux AIO status & todo
- From: Suparna Bhattacharya <[email protected]>
- Re: Linux AIO status & todo
- From: Jakub Jelinek <[email protected]>
- Linux AIO status & todo
- Prev by Date: Re: 2.6.13-rc6-mm2 (hangs on non-SMP x86-64 and oopses)
- Next by Date: [PATCH] asus_acpi M6000A model support
- Previous by thread: Re: Linux AIO status & todo
- Next by thread: Re: Linux AIO status & todo
- Index(es):