AIO: Don't plug the I/O queue in do_io_submit()

Asynchronous I/O latency to a solid-state disk greatly increased between the 2.6.32 and 3.0 kernels.
By removing the plug from do_io_submit(), we observed a 34% improvement in the I/O latency.
Unfortunately, at this level, we don't know if the request is to
a rotating disk or not.

Change-Id: I7101df956473ed9fd5dcff18e473dd93b688a5c1
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: linux-aio@kvack.org
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jeff Moyer <jmoyer@redhat.com>
This commit is contained in:
Dave Kleikamp 2011-12-15 15:44:45 -06:00 committed by Adithya R
parent 0392d6dfee
commit 0179baa847

View File

@ -1659,7 +1659,6 @@ static long do_io_submit(aio_context_t ctx_id, long nr,
struct kioctx *ctx;
long ret = 0;
int i = 0;
struct blk_plug plug;
if (unlikely(nr < 0))
return -EINVAL;
@ -1676,8 +1675,6 @@ static long do_io_submit(aio_context_t ctx_id, long nr,
return -EINVAL;
}
blk_start_plug(&plug);
/*
* AKPM: should this return a partial result if some of the IOs were
* successfully submitted?
@ -1700,7 +1697,6 @@ static long do_io_submit(aio_context_t ctx_id, long nr,
if (ret)
break;
}
blk_finish_plug(&plug);
percpu_ref_put(&ctx->users);
return i ? i : ret;