Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH] block/aio: Enable sysfs nomerge control for I/O requests in the plug list

5 views
Skip to first unread message

Alireza Haghdoost

unread,
Oct 22, 2013, 8:10:01 PM10/22/13
to
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 <ali...@cs.umn.edu>

--- 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 majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Jeff Moyer

unread,
Oct 23, 2013, 12:00:02 PM10/23/13
to
Alireza Haghdoost <ali...@cs.umn.edu> writes:

> 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.

Yeah, this looks like an oversight. Your mailer really munged up the
patch, though. You should fix that and resend (unless Jens just fixes
it up manually). Also, please specify the -p option to diff or just use
git diff.

Reviewed-by: Jeff Moyer <jmo...@redhat.com>

Jens Axboe

unread,
Oct 23, 2013, 12:20:02 PM10/23/13
to
On Wed, Oct 23 2013, Jeff Moyer wrote:
> Alireza Haghdoost <ali...@cs.umn.edu> writes:
>
> > 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.
>
> Yeah, this looks like an oversight. Your mailer really munged up the
> patch, though. You should fix that and resend (unless Jens just fixes
> it up manually). Also, please specify the -p option to diff or just use
> git diff.

I fixed it up, changed the style slightly as well (no point in reading
and checking the plug first). This is what I queued up:

http://git.kernel.dk/?p=linux-block.git;a=commit;h=dfc302d833c46f40b5f775099da00bb0cf0e81ad

--
Jens Axboe
0 new messages