[PATCH] block/aio: Enable sysfs nomerge control for I/O requests inthe plug list
From: Alireza Haghdoost
Date: Tue Oct 22 2013 - 20:05:05 EST
This patch enables the sysfs to control I/O request merge
functionality in the plug list. While this control has been
implemented for the request queue, it was dismissed in the plug list.
Therefore, block layer merges requests together (or attempt to merge)
even if the merge capability was disable using sysfs nomerge parameter
value 2.
This limitation is directly affects functionality of io_submit()
system call. The system call enables user to submit a bunch of IO
requests from user space using struct iocb **ios input argument.
However, the unconditioned merging functionality in the plug list
potentially merges these requests together down the road. Therefore,
there is no way to distinguish between an application sending bunch of
sequential IOs and an application sending one big IO. Ultimately, all
requests generated by the former app merge within the plug list
together and looks similar to the second app.
While the merging functionality is a desirable feature to improve the
performance of IO subsystem for some applications, it is not useful
for other application like ours at all.
Signed-off-by: Alireza Haghdoost <alireza@xxxxxxxxxx>
--- block/blk-core.c.orig 2013-10-22 15:26:59.484961156 -0500
+++ block/blk-core.c 2013-10-21 23:24:21.437887017 -0500
@@ -1420,7 +1420,7 @@
bool ret = false;
plug = current->plug;
- if (!plug)
+ if (!plug || blk_queue_nomerges(q) )
goto out;
*request_count = 0;
--
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/