lkml.org 
[lkml]   [2004]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCH 21/22] fix: flush workqueue on put_ioctx
    On Fri, Jul 02, 2004 at 06:30:30PM +0530, Suparna Bhattacharya wrote:
    > The patchset contains modifications and fixes to the AIO core
    > to support the full retry model, an implementation of AIO
    > support for buffered filesystem AIO reads and O_SYNC writes
    > (the latter courtesy O_SYNC speedup changes from Andrew Morton),
    > an implementation of AIO reads and writes to pipes (from
    > Chris Mason) and AIO poll (again from Chris Mason).
    >
    > Full retry infrastructure and fixes
    > [1] aio-retry.patch
    > [2] 4g4g-aio-hang-fix.patch
    > [3] aio-retry-elevated-refcount.patch
    > [4] aio-splice-runlist.patch
    >
    > FS AIO read
    > [5] aio-wait-page.patch
    > [6] aio-fs_read.patch
    > [7] aio-upfront-readahead.patch
    >
    > AIO for pipes
    > [8] aio-cancel-fix.patch
    > [9] aio-read-immediate.patch
    > [10] aio-pipe.patch
    > [11] aio-context-switch.patch
    >
    > Concurrent O_SYNC write speedups using radix-tree walks
    > [12] writepages-range.patch
    > [13] fix-writeback-range.patch
    > [14] fix-writepages-range.patch
    > [15] fdatawrite-range.patch
    > [16] O_SYNC-speedup.patch
    >
    > AIO O_SYNC write
    > [17] aio-wait_on_page_writeback_range.patch
    > [18] aio-O_SYNC.patch
    > [19] O_SYNC-write-fix.patch
    >
    > AIO poll
    > [20] aio-poll.patch
    >
    > Infrastructure fixes
    > [21] aio-putioctx-flushworkqueue.patch

    --
    Suparna Bhattacharya (suparna@in.ibm.com)
    Linux Technology Center
    IBM Software Lab, India
    ------------------------------------------------------

    From: Chris Mason

    While testing fsaio here, I hit an oops in kick_iocb because iocb->mm
    was null. This was right as the program was exiting.

    With the patch below, I wasn't able to reproduce, it makes sure we flush
    the workqueue every time __put_ioctx gets called.


    aio.c | 6 +-----
    1 files changed, 1 insertion(+), 5 deletions(-)

    --- aio/fs/aio.c 2004-06-21 11:09:50.143627384 -0700
    +++ aio-putioctx-flushworkqueue/fs/aio.c 2004-06-21 11:12:55.359470296 -0700
    @@ -367,6 +367,7 @@ void fastcall __put_ioctx(struct kioctx
    if (unlikely(ctx->reqs_active))
    BUG();

    + flush_workqueue(aio_wq);
    aio_free_ring(ctx);
    mmdrop(ctx->mm);
    ctx->mm = NULL;
    @@ -1205,11 +1206,6 @@ static void io_destroy(struct kioctx *io

    aio_cancel_all(ioctx);
    wait_for_all_aios(ioctx);
    - /*
    - * this is an overkill, but ensures we don't leave
    - * the ctx on the aio_wq
    - */
    - flush_workqueue(aio_wq);
    put_ioctx(ioctx); /* once for the lookup */
    }

    -
    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/
    \
     
     \ /
      Last update: 2005-03-22 14:04    [W:0.025 / U:0.604 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site