LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Sébastien Dugué" <sebastien.dugue@bull.net>
To: Jakub Jelinek <jakub@redhat.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	linux-aio <linux-aio@kvack.org>, Andrew Morton <akpm@osdl.org>,
	Suparna Bhattacharya <suparna@in.ibm.com>,
	Christoph Hellwig <hch@infradead.org>,
	Zach Brown <zach.brown@oracle.com>,
	Badari Pulavarty <pbadari@us.ibm.com>,
	Ulrich Drepper <drepper@redhat.com>,
	Jean Pierre Dion <jean-pierre.dion@bull.net>
Subject: Re: [PATCH -mm 4/5][AIO] - AIO completion signal notification
Date: Wed, 29 Nov 2006 14:25:16 +0100	[thread overview]
Message-ID: <20061129142516.58eb38df@frecb000686> (raw)
In-Reply-To: <20061129113335.GJ6570@devserv.devel.redhat.com>

On Wed, 29 Nov 2006 06:33:35 -0500, Jakub Jelinek <jakub@redhat.com> wrote:

> On Wed, Nov 29, 2006 at 11:33:01AM +0100, S?bastien Dugu? wrote:
> >                       AIO completion signal notification
> > 
> >   The current 2.6 kernel does not support notification of user space via
> > an RT signal upon an asynchronous IO completion. The POSIX specification
> > states that when an AIO request completes, a signal can be delivered to
> > the application as notification.
> > 
> >   This patch adds a struct sigevent *aio_sigeventp to the iocb.
> > The relevant fields (pid, signal number and value) are stored in the kiocb
> > for use when the request completes.
> > 
> >   That sigevent structure is filled by the application as part of the AIO
> > request preparation. Upon request completion, the kernel notifies the
> > application using those sigevent parameters. If SIGEV_NONE has been specified,
> > then the old behaviour is retained and the application must rely on polling
> > the completion queue using io_getevents().
> 
> Well, from what I see applications must rely on polling the completion
> queue using io_getevents() in any case, isn't that the only way how to free
> the kernel resources associated with the AIO request, even if it uses
> SIGEV_SIGNAL or thread notification?

  Well, applications do not need to do any polling on the queue anymore.
io_getevents() needs to be called only once when the signal has been received,
either from a signal handler or from a thread blocking on the signal.

> aio_error/aio_return/aio_suspend
> will still need to io_getevents,

  Right, but only once.

> the only important difference with this
> patch is that a) the polling doesn't need to be asynchronous (i.e. have
> a special thread which just loops doing io_getevents)

  Yes, no more polling loop and I think this makes a big difference.

> b) it doesn't need to care about notification itself.
> 

  Uh! what do you mean here?

  Sébastien.

  reply	other threads:[~2006-11-29 13:25 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-29 10:24 [PATCH -mm 0/5][AIO] - AIO completion signal notification v3 Sébastien Dugué
2006-11-29 10:32 ` [PATCH -mm 1/5][AIO] - Rework compat_sys_io_submit Sébastien Dugué
2006-11-30  0:47   ` Zach Brown
2006-11-30  9:57     ` Sébastien Dugué
2006-11-30 17:27       ` Zach Brown
2006-11-29 10:32 ` [PATCH -mm 2/5][AIO] - fix aio.h includes Sébastien Dugué
2006-11-29 10:32 ` [PATCH -mm 3/5][AIO] - export good_sigevent() Sébastien Dugué
2006-11-29 10:38   ` Christoph Hellwig
2006-11-29 10:46     ` Sébastien Dugué
2006-11-29 14:54   ` Christoph Hellwig
2006-11-29 16:10     ` Sébastien Dugué
2006-12-04 17:13   ` Bharata B Rao
2006-12-05  8:30     ` Sébastien Dugué
2006-11-29 10:33 ` [PATCH -mm 4/5][AIO] - AIO completion signal notification Sébastien Dugué
2006-11-29 10:51   ` Christoph Hellwig
2006-11-29 13:08     ` Sébastien Dugué
2006-11-29 13:50       ` Christoph Hellwig
2006-11-29 14:18         ` Sébastien Dugué
2006-11-29 11:33   ` Jakub Jelinek
2006-11-29 13:25     ` Sébastien Dugué [this message]
2006-11-29 10:33 ` [PATCH -mm 5/5][AIO] - Listio support Sébastien Dugué
2006-11-30  8:25   ` Suparna Bhattacharya
2006-11-30 10:04     ` Sébastien Dugué
2006-11-30 15:38 [PATCH -mm 0/5][AIO] - AIO completion signal notification v4 Sébastien Dugué
2006-11-30 15:50 ` [PATCH -mm 4/5][AIO] - AIO completion signal notification Sébastien Dugué
     [not found] <20070117104601.36b2ab18@frecb000686>
2007-01-17  9:50 ` Sébastien Dugué
2007-01-24  5:35   ` Andrew Morton
2007-01-24 11:11     ` Sébastien Dugué
2007-01-25  5:42       ` Christoph Hellwig
2007-01-25  8:46         ` Sébastien Dugué

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061129142516.58eb38df@frecb000686 \
    --to=sebastien.dugue@bull.net \
    --cc=akpm@osdl.org \
    --cc=drepper@redhat.com \
    --cc=hch@infradead.org \
    --cc=jakub@redhat.com \
    --cc=jean-pierre.dion@bull.net \
    --cc=linux-aio@kvack.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbadari@us.ibm.com \
    --cc=suparna@in.ibm.com \
    --cc=zach.brown@oracle.com \
    --subject='Re: [PATCH -mm 4/5][AIO] - AIO completion signal notification' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).