linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block/aio: Enable sysfs nomerge control for I/O requests in the plug list
@ 2013-10-22 23:54 Alireza Haghdoost
  2013-10-23 15:54 ` Jeff Moyer
  0 siblings, 1 reply; 3+ messages in thread
From: Alireza Haghdoost @ 2013-10-22 23:54 UTC (permalink / raw)
  To: Jens Axboe, linux-kernel; +Cc: Jerry Fredin, linux-aio, linux-fsdevel

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>

--- 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, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block/aio: Enable sysfs nomerge control for I/O requests in the plug list
  2013-10-22 23:54 [PATCH] block/aio: Enable sysfs nomerge control for I/O requests in the plug list Alireza Haghdoost
@ 2013-10-23 15:54 ` Jeff Moyer
  2013-10-23 16:10   ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Moyer @ 2013-10-23 15:54 UTC (permalink / raw)
  To: Alireza Haghdoost
  Cc: Jens Axboe, linux-kernel, Jerry Fredin, linux-aio, linux-fsdevel

Alireza Haghdoost <alireza@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 <jmoyer@redhat.com>

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block/aio: Enable sysfs nomerge control for I/O requests in the plug list
  2013-10-23 15:54 ` Jeff Moyer
@ 2013-10-23 16:10   ` Jens Axboe
  0 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2013-10-23 16:10 UTC (permalink / raw)
  To: Jeff Moyer
  Cc: Alireza Haghdoost, linux-kernel, Jerry Fredin, linux-aio,
	linux-fsdevel

On Wed, Oct 23 2013, Jeff Moyer wrote:
> Alireza Haghdoost <alireza@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

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-23 16:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-22 23:54 [PATCH] block/aio: Enable sysfs nomerge control for I/O requests in the plug list Alireza Haghdoost
2013-10-23 15:54 ` Jeff Moyer
2013-10-23 16:10   ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).