From: Jens Axboe <axboe@kernel.dk>
To: Dan Ehrenberg <dehrenberg@google.com>
Cc: fio@vger.kernel.org
Subject: Re: [PATCH v2] Adding userspace_libaio_reap option
Date: Tue, 30 Aug 2011 18:57:47 -0600 [thread overview]
Message-ID: <4E5D870B.8050108@kernel.dk> (raw)
In-Reply-To: <1314751823-17972-1-git-send-email-dehrenberg@google.com>
On 2011-08-30 18:50, Dan Ehrenberg wrote:
> @@ -66,7 +107,16 @@ static int fio_libaio_getevents(struct thread_data *td, unsigned int min,
> int r, events = 0;
>
> do {
> - r = io_getevents(ld->aio_ctx, actual_min, max, ld->aio_events + events, t);
> + if (td->o.userspace_libaio_reap == 1
> + && actual_min == 0
> + && ((struct aio_ring *)(ld->aio_ctx))->magic
> + == AIO_RING_MAGIC) {
> + r = user_io_getevents(ld->aio_ctx, max,
> + ld->aio_events + events);
> + } else {
> + r = io_getevents(ld->aio_ctx, actual_min,
> + max, ld->aio_events + events, t);
> + }
One question here - why depend on actual_min == 0? The check is
practically free, would not hurt to do the user_io_getevents() first and
punt to io_getevents() afterwards if need be.
--
Jens Axboe
next prev parent reply other threads:[~2011-08-31 0:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-31 0:50 [PATCH v2] Adding userspace_libaio_reap option Dan Ehrenberg
2011-08-31 0:57 ` Jens Axboe [this message]
2011-08-31 1:09 ` Daniel Ehrenberg
2011-08-31 2:47 ` Jens Axboe
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=4E5D870B.8050108@kernel.dk \
--to=axboe@kernel.dk \
--cc=dehrenberg@google.com \
--cc=fio@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.