From: Avi Kivity <avi@argo.co.il>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>,
Suparna Bhattacharya <suparna@in.ibm.com>,
Zach Brown <zach.brown@oracle.com>,
Benjamin LaHaise <bcrl@kvack.org>
Subject: Re: [patch 13/13] signal/timer/event fds v9 - KAIO eventfd support example ...
Date: Sun, 01 Apr 2007 18:06:56 +0300 [thread overview]
Message-ID: <460FCA90.4000003@argo.co.il> (raw)
In-Reply-To: <send-serie.davidel@xmailserver.org.16816.1175371778.13>
Davide Libenzi wrote:
> This is an example about how to add eventfd support to the current KAIO code,
> in order to enable KAIO to post readiness events to a pollable fd
> (hence compatible with POSIX select/poll). The KAIO code simply signals
> the eventfd fd when events are ready, and this triggers a POLLIN in the fd.
> This patch uses a reserved for future use member of the struct iocb to pass
> an eventfd file descriptor, that KAIO will use to post events every time
> a request completes. At that point, an aio_getevents() will return the
> completed result to a struct io_event.
> I made a quick test program to verify the patch, and it runs fine here:
>
> Index: linux-2.6.21-rc5.fds/include/linux/aio_abi.h
> ===================================================================
> --- linux-2.6.21-rc5.fds.orig/include/linux/aio_abi.h 2007-03-31 12:45:30.000000000 -0700
> +++ linux-2.6.21-rc5.fds/include/linux/aio_abi.h 2007-03-31 12:46:31.000000000 -0700
> @@ -84,7 +84,11 @@
>
> /* extra parameters */
> __u64 aio_reserved2; /* TODO: use this for a (struct sigevent *) */
> - __u64 aio_reserved3;
> + __u32 aio_reserved3;
> + /*
> + * If different from 0, this is an eventfd to deliver AIO results to
> + */
> + __u32 aio_resfd;
> }; /* 64 bytes */
>
What is the motivation for adding aio_resfd to an individual iocb
instead of the entire io context? It seems redundant, as you can
already create multiple io contexts to wait on.
[also, minor nit: sys_eventfd() can legitimately return 0, but you're
banning its use in aio. userspace could easily dup() and close(), but...]
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2007-04-01 15:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-31 20:09 [patch 13/13] signal/timer/event fds v9 - KAIO eventfd support example Davide Libenzi
2007-04-01 15:06 ` Avi Kivity [this message]
2007-04-01 17:07 ` Davide Libenzi
2007-04-01 17:23 ` Linus Torvalds
2007-04-01 17:31 ` Davide Libenzi
2007-04-01 18:42 ` Avi Kivity
2007-04-01 18:49 ` Davide Libenzi
2007-04-01 20:11 ` Avi Kivity
2007-04-01 20:20 ` Davide Libenzi
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=460FCA90.4000003@argo.co.il \
--to=avi@argo.co.il \
--cc=akpm@linux-foundation.org \
--cc=bcrl@kvack.org \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=suparna@in.ibm.com \
--cc=torvalds@linux-foundation.org \
--cc=zach.brown@oracle.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox