Re: Revert "aio: fix aio request leak when events are reaped by user space"

From: Dan Aloni
Date: Fri Aug 22 2014 - 12:15:15 EST


On Fri, Aug 22, 2014 at 12:01:11PM -0400, Benjamin LaHaise wrote:
> On Tue, Aug 19, 2014 at 08:46:51PM -0400, Benjamin LaHaise wrote:
> > You can trigger the behaviour with fio by using userspace event reaping.
> > Adding a test case for that behaviour to libaio would be a good idea.
>
> > I thought about how to fix this, and it isn't actually that hard. Move
> > the put_reqs_available() call back into event consumption, and then add
> > code in the submit path to call put_reqs_available() if the system runs
> > out of events by noticing that there is free space in the event ring.
> > Something along the lines below should do it (please note, this is
> > completely untested!). I'll test and polish this off tomorrow, as it's
> > getting a bit late here.
>
> Dan, does this patch work for you? It seems to pass your test program
> when I run it in a vm...

Sorry, I was waiting for a new patch from your direction, I should
have replied earlier. What bothered me about the patch you sent is that
completed_events is added as a new field but nothing assigns to it, so I
wonder how it can be effective.

--
Dan Aloni
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/