Re: [RFC] [PATCH] 2.5.35 patch for making DIO async

Suparna Bhattacharya (suparna@in.ibm.com)
Thu, 19 Sep 2002 17:06:18 +0530


On Thu, Sep 19, 2002 at 04:22:14PM +0530, Suparna Bhattacharya wrote:
> On Wed, Sep 18, 2002 at 01:47:06PM -0700, Badari Pulavarty wrote:
> > Ben,
> >
> > aio_read/aio_write() are now working with a minor fix to fs/aio.c
> >
> > io_submit_one():
> >
> > if (likely(EIOCBQUEUED == ret))
> >
> > needs to be changed to
> >
> > if (likely(-EIOCBQUEUED == ret))
> > ^^^
> >
> >
> > I was wondering what happens to following case (I think this
> > happend in my test program).
> >
> > Lets say, I did an sys_io_submit() and my test program did exit().
> > When the IO complete happend, it tried to do following and got
> > an OOPS in aio_complete().
> >
> > if (ctx == &ctx->mm->default_kioctx) {
> >
> > I think "mm" is freed up, when process exited. Do you think this is
> > possible ? How do we handle this ?
>
> Do you see this only in the sync case ?
> init_sync_iocb ought to increment ctx->reqs_active, so that
> exit_aio waits for the iocb's to complete.

Sorry, guess in the sync case, exit_aio shouldn't happen since
the current thread still has a reference to the mm.

And your problem is with the io_submit case ... have to look closely
to find out why.

>
> Regards
> Suparna
> --
> 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/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/