[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <x491qnl5ioe.fsf@segfault.boston.devel.redhat.com>
Date: Mon, 23 Jan 2023 11:17:53 -0500
From: Jeff Moyer <jmoyer@...hat.com>
To: Kent Overstreet <kent.overstreet@...ux.dev>
Cc: linux-kernel@...r.kernel.org, linux-aio@...ck.org,
linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH v2] fs/aio: obey min_nr when doing wakeups
Jeff Moyer <jmoyer@...hat.com> writes:
> Hi, Kent,
>
> Kent Overstreet <kent.overstreet@...ux.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
Powered by blists - more mailing lists