summaryrefslogtreecommitdiff
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorAlireza Haghdoost <alireza@cs.umn.edu>2013-10-23 17:08:16 +0100
committerJens Axboe <axboe@kernel.dk>2013-11-08 09:00:22 -0700
commit23779fbc99302dddab7f056ae47c3463169cbb64 (patch)
tree41b90cf9974d72a6abe4778b93ddf8fba5fb8e4e /block/blk-core.c
parentd82ae52e68892338068e7559a0c0657193341ce4 (diff)
block: Enable sysfs nomerge control for I/O requests in the plug list
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@cs.umn.edu> Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Coding style modified. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index fce4b9387f36..25f13479f552 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1429,6 +1429,9 @@ static bool attempt_plug_merge(struct request_queue *q, struct bio *bio,
struct request *rq;
bool ret = false;
+ if (blk_queue_nomerges(q))
+ goto out;
+
plug = current->plug;
if (!plug)
goto out;