mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
Merge "Revert "aio: only use blk plugs for > 2 depth submissions""
This commit is contained in:
commit
24803b2fdf
1 changed files with 4 additions and 14 deletions
18
fs/aio.c
18
fs/aio.c
|
|
@ -71,12 +71,6 @@ struct aio_ring {
|
|||
struct io_event io_events[0];
|
||||
}; /* 128 bytes + ring size */
|
||||
|
||||
/*
|
||||
* Plugging is meant to work with larger batches of IOs. If we don't
|
||||
* have more than the below, then don't bother setting up a plug.
|
||||
*/
|
||||
#define AIO_PLUG_THRESHOLD 2
|
||||
|
||||
#define AIO_RING_PAGES 8
|
||||
|
||||
struct kioctx_table {
|
||||
|
|
@ -1932,8 +1926,7 @@ SYSCALL_DEFINE3(io_submit, aio_context_t, ctx_id, long, nr,
|
|||
if (nr > ctx->nr_events)
|
||||
nr = ctx->nr_events;
|
||||
|
||||
if (nr > AIO_PLUG_THRESHOLD)
|
||||
blk_start_plug(&plug);
|
||||
blk_start_plug(&plug);
|
||||
for (i = 0; i < nr; i++) {
|
||||
struct iocb __user *user_iocb;
|
||||
|
||||
|
|
@ -1946,8 +1939,7 @@ SYSCALL_DEFINE3(io_submit, aio_context_t, ctx_id, long, nr,
|
|||
if (ret)
|
||||
break;
|
||||
}
|
||||
if (nr > AIO_PLUG_THRESHOLD)
|
||||
blk_finish_plug(&plug);
|
||||
blk_finish_plug(&plug);
|
||||
|
||||
percpu_ref_put(&ctx->users);
|
||||
return i ? i : ret;
|
||||
|
|
@ -1974,8 +1966,7 @@ COMPAT_SYSCALL_DEFINE3(io_submit, compat_aio_context_t, ctx_id,
|
|||
if (nr > ctx->nr_events)
|
||||
nr = ctx->nr_events;
|
||||
|
||||
if (nr > AIO_PLUG_THRESHOLD)
|
||||
blk_start_plug(&plug);
|
||||
blk_start_plug(&plug);
|
||||
for (i = 0; i < nr; i++) {
|
||||
compat_uptr_t user_iocb;
|
||||
|
||||
|
|
@ -1988,8 +1979,7 @@ COMPAT_SYSCALL_DEFINE3(io_submit, compat_aio_context_t, ctx_id,
|
|||
if (ret)
|
||||
break;
|
||||
}
|
||||
if (nr > AIO_PLUG_THRESHOLD)
|
||||
blk_finish_plug(&plug);
|
||||
blk_finish_plug(&plug);
|
||||
|
||||
percpu_ref_put(&ctx->users);
|
||||
return i ? i : ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue