[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-aio
Subject:    Re: [PATCH v2] fs/aio: obey min_nr when doing wakeups
From:       Kent Overstreet <kent.overstreet () linux ! dev>
Date:       2023-01-23 19:54:18
Message-ID: Y87l6sd9JRGa+qFw () moria ! home ! lan
[Download RAW message or body]

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...

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic