Linux RAID subsystem development
 help / color / mirror / Atom feed
* [PATCH] md: use REQ_NOIDLE flag in md_super_write()
@ 2011-08-03 15:57 Namhyung Kim
  2011-08-04  4:26 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: Namhyung Kim @ 2011-08-03 15:57 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-raid, linux-kernel

Queue idling is used for the anticipation of immediate
sequencial I/O's but md_super_write() is a kind of one-
shot operation, coupled with md_super_wait(), so the
idling in this case will be just a waste of time.

Specifying REQ_NOIDLE prevents it. Instead of adding
the flag to submit_bio() directly, use pre-defined
macro WRITE_FLUSH_FUA.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
 drivers/md/md.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index d97a62534798..8650e9a0ce7c 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -848,7 +848,7 @@ void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev,
 	bio->bi_end_io = super_written;
 
 	atomic_inc(&mddev->pending_writes);
-	submit_bio(REQ_WRITE | REQ_SYNC | REQ_FLUSH | REQ_FUA, bio);
+	submit_bio(WRITE_FLUSH_FUA, bio);
 }
 
 void md_super_wait(mddev_t *mddev)
-- 
1.7.6


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

* Re: [PATCH] md: use REQ_NOIDLE flag in md_super_write()
  2011-08-03 15:57 [PATCH] md: use REQ_NOIDLE flag in md_super_write() Namhyung Kim
@ 2011-08-04  4:26 ` NeilBrown
  0 siblings, 0 replies; 2+ messages in thread
From: NeilBrown @ 2011-08-04  4:26 UTC (permalink / raw)
  To: Namhyung Kim; +Cc: linux-raid, linux-kernel

On Thu,  4 Aug 2011 00:57:57 +0900 Namhyung Kim <namhyung@gmail.com> wrote:

> Queue idling is used for the anticipation of immediate
> sequencial I/O's but md_super_write() is a kind of one-
> shot operation, coupled with md_super_wait(), so the
> idling in this case will be just a waste of time.
> 
> Specifying REQ_NOIDLE prevents it. Instead of adding
> the flag to submit_bio() directly, use pre-defined
> macro WRITE_FLUSH_FUA.
> 
> Signed-off-by: Namhyung Kim <namhyung@gmail.com>
> ---
>  drivers/md/md.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index d97a62534798..8650e9a0ce7c 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -848,7 +848,7 @@ void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev,
>  	bio->bi_end_io = super_written;
>  
>  	atomic_inc(&mddev->pending_writes);
> -	submit_bio(REQ_WRITE | REQ_SYNC | REQ_FLUSH | REQ_FUA, bio);
> +	submit_bio(WRITE_FLUSH_FUA, bio);
>  }
>  
>  void md_super_wait(mddev_t *mddev)

Applied, thanks.

NeilBrown



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

end of thread, other threads:[~2011-08-04  4:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-03 15:57 [PATCH] md: use REQ_NOIDLE flag in md_super_write() Namhyung Kim
2011-08-04  4:26 ` NeilBrown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox