From: Jeff Moyer <jmoyer@redhat.com>
To: Kent Overstreet <kent.overstreet@linux.dev>
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 11:17:53 -0500 [thread overview]
Message-ID: <x491qnl5ioe.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <x49cz7956ox.fsf@segfault.boston.devel.redhat.com> (Jeff Moyer's message of "Fri, 20 Jan 2023 14:47:42 -0500")
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....
Cheers,
Jeff
next prev parent reply other threads:[~2023-01-23 16:14 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 [this message]
2023-01-23 19:54 ` Kent Overstreet
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=x491qnl5ioe.fsf@segfault.boston.devel.redhat.com \
--to=jmoyer@redhat.com \
--cc=kent.overstreet@linux.dev \
--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).