From: Kent Overstreet <kent.overstreet@linux.dev>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-aio@kvack.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v2] fs/aio: obey min_nr when doing wakeups
Date: Mon, 23 Jan 2023 14:54:18 -0500 [thread overview]
Message-ID: <Y87l6sd9JRGa+qFw@moria.home.lan> (raw)
In-Reply-To: <x491qnl5ioe.fsf@segfault.boston.devel.redhat.com>
On Mon, Jan 23, 2023 at 11:17:53AM -0500, Jeff Moyer wrote:
> Jeff Moyer <jmoyer@redhat.com> writes:
>
> > Hi, Kent,
> >
> > Kent Overstreet <kent.overstreet@linux.dev> writes:
> >
> >> I've been observing workloads where IPIs due to wakeups in
> >> aio_complete() are ~15% of total CPU time in the profile. Most of those
> >> wakeups are unnecessary when completion batching is in use in
> >> io_getevents().
> >>
> >> This plumbs min_nr through via the wait eventry, so that aio_complete()
> >> can avoid doing unnecessary wakeups.
> >>
> >> v2: This fixes a race in the first version of the patch. If we read some
> >> events out after adding to the waitlist, we need to update wait.min_nr
> >> call prepare_to_wait_event() again before scheduling.
> >
> > I like the idea of the patch, and I'll get some real world performance
> > numbers soon. But first, this version (and the previous version as
> > well) fails test case 23 in the libaio regression test suite:
> >
> > Starting cases/23.p
> > FAIL: poll missed an event!
> > FAIL: poll missed an event!
> > test cases/23.t completed FAILED.
>
> It turns out that this only fails on the (relatively) old kernel against
> which I applied the patches. When I apply both patches to the latest
> tree, there is no test failure.
>
> Sorry for the noise, I'll be sure to test on the latest going forward.
> Now to figure out what changed elsewhere to fix this....
That's odd - let me know if you'd like me to take a look...
prev parent reply other threads:[~2023-01-23 19:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-18 15:26 [PATCH 1/2] fs/aio: Use kmap_local() instead of kmap() Kent Overstreet
2023-01-18 15:26 ` [PATCH 2/2] fs/aio: obey min_nr when doing wakeups Kent Overstreet
2023-01-18 18:19 ` [PATCH 1/2] fs/aio: Use kmap_local() instead of kmap() Jeff Moyer
2023-01-20 14:03 ` [PATCH v2] fs/aio: obey min_nr when doing wakeups Kent Overstreet
2023-01-20 19:47 ` Jeff Moyer
2023-01-23 16:17 ` Jeff Moyer
2023-01-23 19:54 ` Kent Overstreet [this message]
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=Y87l6sd9JRGa+qFw@moria.home.lan \
--to=kent.overstreet@linux.dev \
--cc=jmoyer@redhat.com \
--cc=linux-aio@kvack.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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 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).