All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] block bits for 3.1-rc
@ 2011-08-19 13:16 Jens Axboe
  2011-08-19 17:50 ` Linus Torvalds
  2011-08-20 17:41 ` Christoph Hellwig
  0 siblings, 2 replies; 14+ messages in thread
From: Jens Axboe @ 2011-08-19 13:16 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

Hi Linus,

This is a lot larger than it usually would be at this time. The
reason is mostly the expedited merge window overlapping with
my vacation. That said, the traffic in this branch in the last
few weeks has only been fixes and it's continually been in linux-next
and run on my various machines. So I'm quite confident that it's sound.

So what's in here:

- A few fixes for some cdrom corner cases.
- Flush fixing for stacked devices
- Revert of the CFQ meta data special treatment patch, it's been shown
  to regress a kernel build workload by about 10%. More investigation
  is needed, for 3.1 lets just back it out.
- bsg helper library, moving the FC class code into the block layer
  for proper sharing with eg iscsi/SAS.
- Nicer loop multi device handling code, and loop deadlock fix.
- Two fixups for xen-blkfront, one for xen-blkback.
- Fixups for rq_affinity changes that went into 3.1-rc1.
- Fixup for CFQ
- Support for properly tracing FLUSH and FUA commands with blktrace.

Diffstat looks large because of the bsg-lib addition, apart from that
it's mostly smallish stuff.

Please pull.


  git://git.kernel.dk/linux-block.git for-linus

Andrew Morton (1):
      drivers/cdrom/cdrom.c: relax check on dvd manufacturer value

Axel Lin (1):
      block: swim3: fix unterminated of_device_id table

H Hartley Sweeten (1):
      drivers/block/drbd/drbd_nl.c: use bitmap_parse instead of __bitmap_parse

Herbert Poetzl (1):
      block/genhd.c: remove useless cast in diskstats_show()

Jeff Moyer (2):
      allow blk_flush_policy to return REQ_FSEQ_DATA independent of *FLUSH
      block: fix flush machinery for stacking drivers with differring flush flags

Jens Axboe (3):
      bsg-lib: add module.h include
      Merge branch 'stable/for-jens' of git://git.kernel.org/.../konrad/xen into for-linus
      Revert "cfq: Remove special treatment for metadata rqs."

Kay Sievers (4):
      loop: replace linked list of allocated devices with an idr index
      loop: add management interface for on-demand device allocation
      loop: add BLK_DEV_LOOP_MIN_COUNT=%i to allow distros 0 pre-allocated loop devices
      loop: fix deadlock when sysfs and LOOP_CLR_FD race against each other

Konrad Rzeszutek Wilk (1):
      xen/blkback: Make description more obvious.

Matthew Wilcox (1):
      Move some REQ flags to the common bio/request area

Mike Christie (1):
      block: add bsg helper library

Namhyung Kim (1):
      blktrace: add FLUSH/FUA support

Shaohua Li (2):
      blk-throttle: correctly determine sync bio
      block: improve rq_affinity placement

Stefan Bader (2):
      xen-blkfront: Drop name and minor adjustments for emulated scsi devices
      xen-blkfront: Fix one off warning about name clash

Tao Ma (1):
      block: Make rq_affinity = 1 work as expected

Vivek Goyal (2):
      cfq-iosched: Reduce linked group count upon group destruction
      cfq-iosched: Add documentation about idling

 Documentation/block/cfq-iosched.txt |   71 +++++++++
 Documentation/kernel-parameters.txt |    9 +-
 block/Kconfig                       |   10 ++
 block/Makefile                      |    1 +
 block/blk-core.c                    |    8 +-
 block/blk-flush.c                   |   25 +++-
 block/blk-softirq.c                 |    8 +
 block/blk-throttle.c                |    4 +-
 block/blk.h                         |    2 +
 block/bsg-lib.c                     |  298 +++++++++++++++++++++++++++++++++++
 block/cfq-iosched.c                 |   21 +++
 block/genhd.c                       |    8 +-
 drivers/block/Kconfig               |   17 ++-
 drivers/block/drbd/drbd_nl.c        |    4 +-
 drivers/block/loop.c                |  297 ++++++++++++++++++++++++-----------
 drivers/block/swim3.c               |    1 +
 drivers/block/xen-blkfront.c        |    6 +-
 drivers/cdrom/cdrom.c               |    8 +-
 include/linux/blk_types.h           |    7 +-
 include/linux/blkdev.h              |    5 +
 include/linux/blktrace_api.h        |    5 +-
 include/linux/bsg-lib.h             |   73 +++++++++
 include/linux/loop.h                |    5 +-
 include/linux/miscdevice.h          |    1 +
 include/trace/events/block.h        |   20 ++-
 kernel/trace/blktrace.c             |   21 ++-
 26 files changed, 800 insertions(+), 135 deletions(-)
 create mode 100644 block/bsg-lib.c
 create mode 100644 include/linux/bsg-lib.h

-- 
Jens Axboe


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

* Re: [GIT PULL] block bits for 3.1-rc
  2011-08-19 13:16 [GIT PULL] block bits for 3.1-rc Jens Axboe
@ 2011-08-19 17:50 ` Linus Torvalds
  2011-08-19 17:57   ` Jens Axboe
  2011-08-20 17:41 ` Christoph Hellwig
  1 sibling, 1 reply; 14+ messages in thread
From: Linus Torvalds @ 2011-08-19 17:50 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

On Fri, Aug 19, 2011 at 6:16 AM, Jens Axboe <jaxboe@fusionio.com> wrote:
>
> This is a lot larger than it usually would be at this time.

Grr, grr, grr.

I took it, but I want you to *jump* if we have any problems..

              Linus

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

* Re: [GIT PULL] block bits for 3.1-rc
  2011-08-19 17:50 ` Linus Torvalds
@ 2011-08-19 17:57   ` Jens Axboe
  0 siblings, 0 replies; 14+ messages in thread
From: Jens Axboe @ 2011-08-19 17:57 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

On 2011-08-19 19:50, Linus Torvalds wrote:
> On Fri, Aug 19, 2011 at 6:16 AM, Jens Axboe <jaxboe@fusionio.com> wrote:
>>
>> This is a lot larger than it usually would be at this time.
> 
> Grr, grr, grr.
> 
> I took it, but I want you to *jump* if we have any problems..

Sir, yes sir.

I realize it's way too large, and that's exactly why I let it simmer for
a lot longer than usual post -rc1 pull requests. Next time please
coordinate the merge window with my vacation, thanks!

-- 
Jens Axboe


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

* Re: [GIT PULL] block bits for 3.1-rc
  2011-08-19 13:16 [GIT PULL] block bits for 3.1-rc Jens Axboe
  2011-08-19 17:50 ` Linus Torvalds
@ 2011-08-20 17:41 ` Christoph Hellwig
  2011-08-20 19:15   ` Mike Snitzer
  2011-08-21 17:56   ` Jens Axboe
  1 sibling, 2 replies; 14+ messages in thread
From: Christoph Hellwig @ 2011-08-20 17:41 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Linus Torvalds, linux-kernel

On Fri, Aug 19, 2011 at 03:16:40PM +0200, Jens Axboe wrote:
> - Revert of the CFQ meta data special treatment patch, it's been shown
>   to regress a kernel build workload by about 10%. More investigation
>   is needed, for 3.1 lets just back it out.

Sorry, but you can't simply do that without any coordination.  We have
added that marker to xfs now that the stupid special casing stopped,
and turning it back on will cause us massive slowdows.  Next time
please better coordinate this with its users.  In fact I have never
seen this patch or a discussion on any mailinglist.


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

* Re: [GIT PULL] block bits for 3.1-rc
  2011-08-20 17:41 ` Christoph Hellwig
@ 2011-08-20 19:15   ` Mike Snitzer
  2011-08-21 17:56   ` Jens Axboe
  1 sibling, 0 replies; 14+ messages in thread
From: Mike Snitzer @ 2011-08-20 19:15 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Jens Axboe, Linus Torvalds, linux-kernel

On Sat, Aug 20, 2011 at 1:41 PM, Christoph Hellwig <hch@infradead.org> wrote:
> On Fri, Aug 19, 2011 at 03:16:40PM +0200, Jens Axboe wrote:
>> - Revert of the CFQ meta data special treatment patch, it's been shown
>>   to regress a kernel build workload by about 10%. More investigation
>>   is needed, for 3.1 lets just back it out.
>
> Sorry, but you can't simply do that without any coordination.  We have
> added that marker to xfs now that the stupid special casing stopped,
> and turning it back on will cause us massive slowdows.  Next time
> please better coordinate this with its users.  In fact I have never
> seen this patch or a discussion on any mailinglist.

lkml.org archive doesn't have the full thread for some reason, but here it is:
http://www.gossamer-threads.com/lists/linux/kernel/1420370

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

* Re: [GIT PULL] block bits for 3.1-rc
  2011-08-20 17:41 ` Christoph Hellwig
  2011-08-20 19:15   ` Mike Snitzer
@ 2011-08-21 17:56   ` Jens Axboe
  2011-08-21 18:19     ` Christoph Hellwig
  1 sibling, 1 reply; 14+ messages in thread
From: Jens Axboe @ 2011-08-21 17:56 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Linus Torvalds, linux-kernel

On 2011-08-20 19:41, Christoph Hellwig wrote:
> On Fri, Aug 19, 2011 at 03:16:40PM +0200, Jens Axboe wrote:
>> - Revert of the CFQ meta data special treatment patch, it's been shown
>>   to regress a kernel build workload by about 10%. More investigation
>>   is needed, for 3.1 lets just back it out.
> 
> Sorry, but you can't simply do that without any coordination.  We have
> added that marker to xfs now that the stupid special casing stopped,
> and turning it back on will cause us massive slowdows.  Next time
> please better coordinate this with its users.  In fact I have never
> seen this patch or a discussion on any mailinglist.

The discussion was on lkml, as Mike points out. But yes, short time to
react. Since I can't easily cater to both cases right now, how about we
add a temporary second meta flag that is only used for tracing?

        REQ_META        = (__REQ_META | __REQ_META_TRACE),
        RET_META_TRACE  = __REQ_META_TRACE,

You get the idea. Not super pretty, but it should solve the immediate
issue.

-- 
Jens Axboe


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

* Re: [GIT PULL] block bits for 3.1-rc
  2011-08-21 17:56   ` Jens Axboe
@ 2011-08-21 18:19     ` Christoph Hellwig
  2011-08-21 18:37       ` Jens Axboe
  0 siblings, 1 reply; 14+ messages in thread
From: Christoph Hellwig @ 2011-08-21 18:19 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Christoph Hellwig, Linus Torvalds, linux-kernel

On Sun, Aug 21, 2011 at 07:56:17PM +0200, Jens Axboe wrote:
> The discussion was on lkml, as Mike points out. But yes, short time to
> react. Since I can't easily cater to both cases right now, how about we
> add a temporary second meta flag that is only used for tracing?
> 
>         REQ_META        = (__REQ_META | __REQ_META_TRACE),
>         RET_META_TRACE  = __REQ_META_TRACE,
> 
> You get the idea. Not super pretty, but it should solve the immediate
> issue.

I'd do it the other way around and add a new REQ_META_BOOST flag to
the old callers.  I'll cook up a patch on the airport / on my flight
if you want.


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

* Re: [GIT PULL] block bits for 3.1-rc
  2011-08-21 18:19     ` Christoph Hellwig
@ 2011-08-21 18:37       ` Jens Axboe
  2011-08-22 16:52         ` [PATCH 1/2] block: remove READ_META and WRITE_META Christoph Hellwig
  2011-08-22 16:52         ` [PATCH 2/2] block: separate priority boosting from REQ_META Christoph Hellwig
  0 siblings, 2 replies; 14+ messages in thread
From: Jens Axboe @ 2011-08-21 18:37 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Linus Torvalds, linux-kernel

On 2011-08-21 20:19, Christoph Hellwig wrote:
> On Sun, Aug 21, 2011 at 07:56:17PM +0200, Jens Axboe wrote:
>> The discussion was on lkml, as Mike points out. But yes, short time to
>> react. Since I can't easily cater to both cases right now, how about we
>> add a temporary second meta flag that is only used for tracing?
>>
>>         REQ_META        = (__REQ_META | __REQ_META_TRACE),
>>         RET_META_TRACE  = __REQ_META_TRACE,
>>
>> You get the idea. Not super pretty, but it should solve the immediate
>> issue.
> 
> I'd do it the other way around and add a new REQ_META_BOOST flag to
> the old callers.  I'll cook up a patch on the airport / on my flight
> if you want.

That would work fine as well, please do cook up the patch if you have
flight time anyway :-)

-- 
Jens Axboe


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

* [PATCH 1/2] block: remove READ_META and WRITE_META
  2011-08-21 18:37       ` Jens Axboe
@ 2011-08-22 16:52         ` Christoph Hellwig
  2011-08-22 16:52         ` [PATCH 2/2] block: separate priority boosting from REQ_META Christoph Hellwig
  1 sibling, 0 replies; 14+ messages in thread
From: Christoph Hellwig @ 2011-08-22 16:52 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Christoph Hellwig, Linus Torvalds, linux-kernel

Replace all occurnanced of the undocumented READ_META with READ | REQ_META
and remove the unused WRITE_META define.

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/fs/ext3/inode.c
===================================================================
--- linux-2.6.orig/fs/ext3/inode.c	2011-08-21 19:17:33.523476760 -0700
+++ linux-2.6/fs/ext3/inode.c	2011-08-21 19:18:38.583476811 -0700
@@ -1134,7 +1134,7 @@ struct buffer_head *ext3_bread(handle_t
 		return bh;
 	if (buffer_uptodate(bh))
 		return bh;
-	ll_rw_block(READ_META, 1, &bh);
+	ll_rw_block(READ | REQ_META, 1, &bh);
 	wait_on_buffer(bh);
 	if (buffer_uptodate(bh))
 		return bh;
@@ -2807,7 +2807,7 @@ make_io:
 		trace_ext3_load_inode(inode);
 		get_bh(bh);
 		bh->b_end_io = end_buffer_read_sync;
-		submit_bh(READ_META, bh);
+		submit_bh(READ | REQ_META, bh);
 		wait_on_buffer(bh);
 		if (!buffer_uptodate(bh)) {
 			ext3_error(inode->i_sb, "ext3_get_inode_loc",
Index: linux-2.6/fs/ext3/namei.c
===================================================================
--- linux-2.6.orig/fs/ext3/namei.c	2011-08-21 19:17:33.543476759 -0700
+++ linux-2.6/fs/ext3/namei.c	2011-08-21 19:18:00.450143260 -0700
@@ -922,7 +922,7 @@ restart:
 				bh = ext3_getblk(NULL, dir, b++, 0, &err);
 				bh_use[ra_max] = bh;
 				if (bh)
-					ll_rw_block(READ_META, 1, &bh);
+					ll_rw_block(READ | REQ_META, 1, &bh);
 			}
 		}
 		if ((bh = bh_use[ra_ptr++]) == NULL)
Index: linux-2.6/fs/ext4/inode.c
===================================================================
--- linux-2.6.orig/fs/ext4/inode.c	2011-08-21 19:17:33.563476759 -0700
+++ linux-2.6/fs/ext4/inode.c	2011-08-21 19:18:11.500143356 -0700
@@ -650,7 +650,7 @@ struct buffer_head *ext4_bread(handle_t
 		return bh;
 	if (buffer_uptodate(bh))
 		return bh;
-	ll_rw_block(READ_META, 1, &bh);
+	ll_rw_block(READ | REQ_META, 1, &bh);
 	wait_on_buffer(bh);
 	if (buffer_uptodate(bh))
 		return bh;
@@ -3301,7 +3301,7 @@ make_io:
 		trace_ext4_load_inode(inode);
 		get_bh(bh);
 		bh->b_end_io = end_buffer_read_sync;
-		submit_bh(READ_META, bh);
+		submit_bh(READ | REQ_META, bh);
 		wait_on_buffer(bh);
 		if (!buffer_uptodate(bh)) {
 			EXT4_ERROR_INODE_BLOCK(inode, block,
Index: linux-2.6/fs/ext4/namei.c
===================================================================
--- linux-2.6.orig/fs/ext4/namei.c	2011-08-21 19:17:33.583476759 -0700
+++ linux-2.6/fs/ext4/namei.c	2011-08-21 19:18:17.826809949 -0700
@@ -922,7 +922,7 @@ restart:
 				bh = ext4_getblk(NULL, dir, b++, 0, &err);
 				bh_use[ra_max] = bh;
 				if (bh)
-					ll_rw_block(READ_META, 1, &bh);
+					ll_rw_block(READ | REQ_META, 1, &bh);
 			}
 		}
 		if ((bh = bh_use[ra_ptr++]) == NULL)
Index: linux-2.6/fs/gfs2/quota.c
===================================================================
--- linux-2.6.orig/fs/gfs2/quota.c	2011-08-21 19:17:33.603476760 -0700
+++ linux-2.6/fs/gfs2/quota.c	2011-08-21 19:18:33.716809868 -0700
@@ -709,7 +709,7 @@ get_a_page:
 		set_buffer_uptodate(bh);
 
 	if (!buffer_uptodate(bh)) {
-		ll_rw_block(READ_META, 1, &bh);
+		ll_rw_block(READ | REQ_META, 1, &bh);
 		wait_on_buffer(bh);
 		if (!buffer_uptodate(bh))
 			goto unlock_out;
Index: linux-2.6/include/linux/fs.h
===================================================================
--- linux-2.6.orig/include/linux/fs.h	2011-08-21 19:18:48.493476308 -0700
+++ linux-2.6/include/linux/fs.h	2011-08-21 19:19:16.016809882 -0700
@@ -162,10 +162,8 @@ struct inodes_stat_t {
 #define READA			RWA_MASK
 
 #define READ_SYNC		(READ | REQ_SYNC)
-#define READ_META		(READ | REQ_META)
 #define WRITE_SYNC		(WRITE | REQ_SYNC | REQ_NOIDLE)
 #define WRITE_ODIRECT		(WRITE | REQ_SYNC)
-#define WRITE_META		(WRITE | REQ_META)
 #define WRITE_FLUSH		(WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH)
 #define WRITE_FUA		(WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FUA)
 #define WRITE_FLUSH_FUA		(WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH | REQ_FUA)

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

* [PATCH 2/2] block: separate priority boosting from REQ_META
  2011-08-21 18:37       ` Jens Axboe
  2011-08-22 16:52         ` [PATCH 1/2] block: remove READ_META and WRITE_META Christoph Hellwig
@ 2011-08-22 16:52         ` Christoph Hellwig
  2011-08-23  2:05           ` Namhyung Kim
  1 sibling, 1 reply; 14+ messages in thread
From: Christoph Hellwig @ 2011-08-22 16:52 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Christoph Hellwig, Linus Torvalds, linux-kernel

Add a new REQ_PRIO to let requests preempt others in the cfq I/O schedule,
and lave REQ_META purely for marking requests as metadata in blktrace.

All existing callers of REQ_META except for XFS are updated to also
set REQ_PRIO for now.

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/block/cfq-iosched.c
===================================================================
--- linux-2.6.orig/block/cfq-iosched.c	2011-08-22 04:21:21.366808732 +0200
+++ linux-2.6/block/cfq-iosched.c	2011-08-22 04:23:07.263474777 +0200
@@ -130,8 +130,8 @@ struct cfq_queue {
 	unsigned long slice_end;
 	long slice_resid;
 
-	/* pending metadata requests */
-	int meta_pending;
+	/* pending priority requests */
+	int prio_pending;
 	/* number of requests that are on the dispatch list or inside driver */
 	int dispatched;
 
@@ -684,8 +684,8 @@ cfq_choose_req(struct cfq_data *cfqd, st
 	if (rq_is_sync(rq1) != rq_is_sync(rq2))
 		return rq_is_sync(rq1) ? rq1 : rq2;
 
-	if ((rq1->cmd_flags ^ rq2->cmd_flags) & REQ_META)
-		return rq1->cmd_flags & REQ_META ? rq1 : rq2;
+	if ((rq1->cmd_flags ^ rq2->cmd_flags) & REQ_PRIO)
+		return rq1->cmd_flags & REQ_PRIO ? rq1 : rq2;
 
 	s1 = blk_rq_pos(rq1);
 	s2 = blk_rq_pos(rq2);
@@ -1612,9 +1612,9 @@ static void cfq_remove_request(struct re
 	cfqq->cfqd->rq_queued--;
 	cfq_blkiocg_update_io_remove_stats(&(RQ_CFQG(rq))->blkg,
 					rq_data_dir(rq), rq_is_sync(rq));
-	if (rq->cmd_flags & REQ_META) {
-		WARN_ON(!cfqq->meta_pending);
-		cfqq->meta_pending--;
+	if (rq->cmd_flags & REQ_PRIO) {
+		WARN_ON(!cfqq->prio_pending);
+		cfqq->prio_pending--;
 	}
 }
 
@@ -3372,7 +3372,7 @@ cfq_should_preempt(struct cfq_data *cfqd
 	 * So both queues are sync. Let the new request get disk time if
 	 * it's a metadata request and the current queue is doing regular IO.
 	 */
-	if ((rq->cmd_flags & REQ_META) && !cfqq->meta_pending)
+	if ((rq->cmd_flags & REQ_PRIO) && !cfqq->prio_pending)
 		return true;
 
 	/*
@@ -3439,8 +3439,8 @@ cfq_rq_enqueued(struct cfq_data *cfqd, s
 	struct cfq_io_context *cic = RQ_CIC(rq);
 
 	cfqd->rq_queued++;
-	if (rq->cmd_flags & REQ_META)
-		cfqq->meta_pending++;
+	if (rq->cmd_flags & REQ_PRIO)
+		cfqq->prio_pending++;
 
 	cfq_update_io_thinktime(cfqd, cfqq, cic);
 	cfq_update_io_seektime(cfqd, cfqq, rq);
Index: linux-2.6/drivers/mmc/card/block.c
===================================================================
--- linux-2.6.orig/drivers/mmc/card/block.c	2011-08-22 04:19:37.540142693 +0200
+++ linux-2.6/drivers/mmc/card/block.c	2011-08-22 04:20:25.290142598 +0200
@@ -926,6 +926,9 @@ static void mmc_blk_rw_rq_prep(struct mm
 	/*
 	 * Reliable writes are used to implement Forced Unit Access and
 	 * REQ_META accesses, and are supported only on MMCs.
+	 *
+	 * XXX: this really needs a good explanation of why REQ_META
+	 * is treated special.
 	 */
 	bool do_rel_wr = ((req->cmd_flags & REQ_FUA) ||
 			  (req->cmd_flags & REQ_META)) &&
Index: linux-2.6/fs/ext3/inode.c
===================================================================
--- linux-2.6.orig/fs/ext3/inode.c	2011-08-22 04:23:21.060141351 +0200
+++ linux-2.6/fs/ext3/inode.c	2011-08-22 04:23:35.143474634 +0200
@@ -1134,7 +1134,7 @@ struct buffer_head *ext3_bread(handle_t
 		return bh;
 	if (buffer_uptodate(bh))
 		return bh;
-	ll_rw_block(READ | REQ_META, 1, &bh);
+	ll_rw_block(READ | REQ_META | REQ_PRIO, 1, &bh);
 	wait_on_buffer(bh);
 	if (buffer_uptodate(bh))
 		return bh;
@@ -2807,7 +2807,7 @@ make_io:
 		trace_ext3_load_inode(inode);
 		get_bh(bh);
 		bh->b_end_io = end_buffer_read_sync;
-		submit_bh(READ | REQ_META, bh);
+		submit_bh(READ | REQ_META | REQ_PRIO, bh);
 		wait_on_buffer(bh);
 		if (!buffer_uptodate(bh)) {
 			ext3_error(inode->i_sb, "ext3_get_inode_loc",
Index: linux-2.6/fs/ext3/namei.c
===================================================================
--- linux-2.6.orig/fs/ext3/namei.c	2011-08-22 04:23:21.080141351 +0200
+++ linux-2.6/fs/ext3/namei.c	2011-08-22 04:23:50.816807280 +0200
@@ -922,7 +922,8 @@ restart:
 				bh = ext3_getblk(NULL, dir, b++, 0, &err);
 				bh_use[ra_max] = bh;
 				if (bh)
-					ll_rw_block(READ | REQ_META, 1, &bh);
+					ll_rw_block(READ | REQ_META | REQ_PRIO,
+						    1, &bh);
 			}
 		}
 		if ((bh = bh_use[ra_ptr++]) == NULL)
Index: linux-2.6/fs/ext4/inode.c
===================================================================
--- linux-2.6.orig/fs/ext4/inode.c	2011-08-22 04:23:21.100141349 +0200
+++ linux-2.6/fs/ext4/inode.c	2011-08-22 04:24:04.773474193 +0200
@@ -650,7 +650,7 @@ struct buffer_head *ext4_bread(handle_t
 		return bh;
 	if (buffer_uptodate(bh))
 		return bh;
-	ll_rw_block(READ | REQ_META, 1, &bh);
+	ll_rw_block(READ | REQ_META | REQ_PRIO, 1, &bh);
 	wait_on_buffer(bh);
 	if (buffer_uptodate(bh))
 		return bh;
@@ -3301,7 +3301,7 @@ make_io:
 		trace_ext4_load_inode(inode);
 		get_bh(bh);
 		bh->b_end_io = end_buffer_read_sync;
-		submit_bh(READ | REQ_META, bh);
+		submit_bh(READ | REQ_META | REQ_PRIO, bh);
 		wait_on_buffer(bh);
 		if (!buffer_uptodate(bh)) {
 			EXT4_ERROR_INODE_BLOCK(inode, block,
Index: linux-2.6/fs/ext4/namei.c
===================================================================
--- linux-2.6.orig/fs/ext4/namei.c	2011-08-22 04:23:21.116808016 +0200
+++ linux-2.6/fs/ext4/namei.c	2011-08-22 04:24:14.663474365 +0200
@@ -922,7 +922,8 @@ restart:
 				bh = ext4_getblk(NULL, dir, b++, 0, &err);
 				bh_use[ra_max] = bh;
 				if (bh)
-					ll_rw_block(READ | REQ_META, 1, &bh);
+					ll_rw_block(READ | REQ_META | REQ_PRIO,
+						    1, &bh);
 			}
 		}
 		if ((bh = bh_use[ra_ptr++]) == NULL)
Index: linux-2.6/fs/gfs2/log.c
===================================================================
--- linux-2.6.orig/fs/gfs2/log.c	2011-08-22 04:24:37.293474227 +0200
+++ linux-2.6/fs/gfs2/log.c	2011-08-22 04:25:41.663473686 +0200
@@ -624,9 +624,9 @@ static void log_write_header(struct gfs2
 	bh->b_end_io = end_buffer_write_sync;
 	get_bh(bh);
 	if (test_bit(SDF_NOBARRIERS, &sdp->sd_flags))
-		submit_bh(WRITE_SYNC | REQ_META, bh);
+		submit_bh(WRITE_SYNC | REQ_META | REQ_PRIO, bh);
 	else
-		submit_bh(WRITE_FLUSH_FUA | REQ_META, bh);
+		submit_bh(WRITE_FLUSH_FUA | REQ_META | REQ_PRIO, bh);
 	wait_on_buffer(bh);
 
 	if (!buffer_uptodate(bh))
Index: linux-2.6/fs/gfs2/meta_io.c
===================================================================
--- linux-2.6.orig/fs/gfs2/meta_io.c	2011-08-22 04:24:37.313474228 +0200
+++ linux-2.6/fs/gfs2/meta_io.c	2011-08-22 04:25:45.410140489 +0200
@@ -37,7 +37,7 @@ static int gfs2_aspace_writepage(struct
 {
 	struct buffer_head *bh, *head;
 	int nr_underway = 0;
-	int write_op = REQ_META |
+	int write_op = REQ_META | REQ_PRIO |
 		(wbc->sync_mode == WB_SYNC_ALL ? WRITE_SYNC : WRITE);
 
 	BUG_ON(!PageLocked(page));
@@ -225,7 +225,7 @@ int gfs2_meta_read(struct gfs2_glock *gl
 	}
 	bh->b_end_io = end_buffer_read_sync;
 	get_bh(bh);
-	submit_bh(READ_SYNC | REQ_META, bh);
+	submit_bh(READ_SYNC | REQ_META | REQ_PRIO, bh);
 	if (!(flags & DIO_WAIT))
 		return 0;
 
@@ -435,7 +435,7 @@ struct buffer_head *gfs2_meta_ra(struct
 	if (buffer_uptodate(first_bh))
 		goto out;
 	if (!buffer_locked(first_bh))
-		ll_rw_block(READ_SYNC | REQ_META, 1, &first_bh);
+		ll_rw_block(READ_SYNC | REQ_META | REQ_PRIO, 1, &first_bh);
 
 	dblock++;
 	extlen--;
Index: linux-2.6/fs/gfs2/ops_fstype.c
===================================================================
--- linux-2.6.orig/fs/gfs2/ops_fstype.c	2011-08-22 04:24:37.330140894 +0200
+++ linux-2.6/fs/gfs2/ops_fstype.c	2011-08-22 04:25:37.070140598 +0200
@@ -224,7 +224,7 @@ static int gfs2_read_super(struct gfs2_s
 
 	bio->bi_end_io = end_bio_io_page;
 	bio->bi_private = page;
-	submit_bio(READ_SYNC | REQ_META, bio);
+	submit_bio(READ_SYNC | REQ_META | REQ_PRIO, bio);
 	wait_on_page_locked(page);
 	bio_put(bio);
 	if (!PageUptodate(page)) {
Index: linux-2.6/fs/gfs2/quota.c
===================================================================
--- linux-2.6.orig/fs/gfs2/quota.c	2011-08-22 04:23:21.136808016 +0200
+++ linux-2.6/fs/gfs2/quota.c	2011-08-22 04:24:23.220140978 +0200
@@ -709,7 +709,7 @@ get_a_page:
 		set_buffer_uptodate(bh);
 
 	if (!buffer_uptodate(bh)) {
-		ll_rw_block(READ | REQ_META, 1, &bh);
+		ll_rw_block(READ | REQ_META | REQ_PRIO, 1, &bh);
 		wait_on_buffer(bh);
 		if (!buffer_uptodate(bh))
 			goto unlock_out;
Index: linux-2.6/include/linux/blk_types.h
===================================================================
--- linux-2.6.orig/include/linux/blk_types.h	2011-08-22 04:25:50.373473791 +0200
+++ linux-2.6/include/linux/blk_types.h	2011-08-22 04:26:44.443473870 +0200
@@ -124,6 +124,7 @@ enum rq_flag_bits {
 
 	__REQ_SYNC,		/* request is sync (sync write or read) */
 	__REQ_META,		/* metadata io request */
+	__REQ_PRIO,
 	__REQ_DISCARD,		/* request to discard sectors */
 	__REQ_SECURE,		/* secure discard (used with __REQ_DISCARD) */
 
@@ -161,13 +162,14 @@ enum rq_flag_bits {
 #define REQ_FAILFAST_DRIVER	(1 << __REQ_FAILFAST_DRIVER)
 #define REQ_SYNC		(1 << __REQ_SYNC)
 #define REQ_META		(1 << __REQ_META)
+#define REQ_PRIO		(1 << __REQ_PRIO)
 #define REQ_DISCARD		(1 << __REQ_DISCARD)
 #define REQ_NOIDLE		(1 << __REQ_NOIDLE)
 
 #define REQ_FAILFAST_MASK \
 	(REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER)
 #define REQ_COMMON_MASK \
-	(REQ_WRITE | REQ_FAILFAST_MASK | REQ_SYNC | REQ_META | REQ_DISCARD | \
+	(REQ_WRITE | REQ_FAILFAST_MASK | REQ_SYNC | REQ_PRIO | REQ_DISCARD | \
 	 REQ_NOIDLE | REQ_FLUSH | REQ_FUA | REQ_SECURE)
 #define REQ_CLONE_MASK		REQ_COMMON_MASK
 

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

* Re: [PATCH 2/2] block: separate priority boosting from REQ_META
  2011-08-22 16:52         ` [PATCH 2/2] block: separate priority boosting from REQ_META Christoph Hellwig
@ 2011-08-23  2:05           ` Namhyung Kim
  2011-08-23 10:09             ` [PATCH 2/2 v2] " Christoph Hellwig
  0 siblings, 1 reply; 14+ messages in thread
From: Namhyung Kim @ 2011-08-23  2:05 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Jens Axboe, Linus Torvalds, linux-kernel

Hello,


Christoph Hellwig <hch@infradead.org> writes:
> Add a new REQ_PRIO to let requests preempt others in the cfq I/O schedule,
> and lave REQ_META purely for marking requests as metadata in blktrace.
>
> All existing callers of REQ_META except for XFS are updated to also
> set REQ_PRIO for now.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>

snipped...

> Index: linux-2.6/include/linux/blk_types.h
> ===================================================================
> --- linux-2.6.orig/include/linux/blk_types.h	2011-08-22 04:25:50.373473791 +0200
> +++ linux-2.6/include/linux/blk_types.h	2011-08-22 04:26:44.443473870 +0200
> @@ -124,6 +124,7 @@ enum rq_flag_bits {
>  
>  	__REQ_SYNC,		/* request is sync (sync write or read) */
>  	__REQ_META,		/* metadata io request */
> +	__REQ_PRIO,

It'd be better if it's commented too, IMHO.


>  	__REQ_DISCARD,		/* request to discard sectors */
>  	__REQ_SECURE,		/* secure discard (used with __REQ_DISCARD) */
>  
> @@ -161,13 +162,14 @@ enum rq_flag_bits {
>  #define REQ_FAILFAST_DRIVER	(1 << __REQ_FAILFAST_DRIVER)
>  #define REQ_SYNC		(1 << __REQ_SYNC)
>  #define REQ_META		(1 << __REQ_META)
> +#define REQ_PRIO		(1 << __REQ_PRIO)
>  #define REQ_DISCARD		(1 << __REQ_DISCARD)
>  #define REQ_NOIDLE		(1 << __REQ_NOIDLE)
>  
>  #define REQ_FAILFAST_MASK \
>  	(REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER)
>  #define REQ_COMMON_MASK \
> -	(REQ_WRITE | REQ_FAILFAST_MASK | REQ_SYNC | REQ_META | REQ_DISCARD | \
> +	(REQ_WRITE | REQ_FAILFAST_MASK | REQ_SYNC | REQ_PRIO | REQ_DISCARD | \
>  	 REQ_NOIDLE | REQ_FLUSH | REQ_FUA | REQ_SECURE)
>  #define REQ_CLONE_MASK		REQ_COMMON_MASK
>  

I think you need to include REQ_META into REQ_COMMON_MASK in order to
track those requests using blktrace.

Thanks.

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

* [PATCH 2/2 v2] block: separate priority boosting from REQ_META
  2011-08-23  2:05           ` Namhyung Kim
@ 2011-08-23 10:09             ` Christoph Hellwig
  2011-08-23 12:31               ` Namhyung Kim
  2011-08-23 12:52               ` Jens Axboe
  0 siblings, 2 replies; 14+ messages in thread
From: Christoph Hellwig @ 2011-08-23 10:09 UTC (permalink / raw)
  To: Namhyung Kim; +Cc: Christoph Hellwig, Jens Axboe, Linus Torvalds, linux-kernel

Add a new REQ_PRIO to let requests preempt others in the cfq I/O schedule,
and lave REQ_META purely for marking requests as metadata in blktrace.

All existing callers of REQ_META except for XFS are updated to also
set REQ_PRIO for now.

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/block/cfq-iosched.c
===================================================================
--- linux-2.6.orig/block/cfq-iosched.c	2011-08-23 02:29:10.843355420 +0200
+++ linux-2.6/block/cfq-iosched.c	2011-08-23 10:18:19.430245519 +0200
@@ -130,8 +130,8 @@ struct cfq_queue {
 	unsigned long slice_end;
 	long slice_resid;
 
-	/* pending metadata requests */
-	int meta_pending;
+	/* pending priority requests */
+	int prio_pending;
 	/* number of requests that are on the dispatch list or inside driver */
 	int dispatched;
 
@@ -684,8 +684,8 @@ cfq_choose_req(struct cfq_data *cfqd, st
 	if (rq_is_sync(rq1) != rq_is_sync(rq2))
 		return rq_is_sync(rq1) ? rq1 : rq2;
 
-	if ((rq1->cmd_flags ^ rq2->cmd_flags) & REQ_META)
-		return rq1->cmd_flags & REQ_META ? rq1 : rq2;
+	if ((rq1->cmd_flags ^ rq2->cmd_flags) & REQ_PRIO)
+		return rq1->cmd_flags & REQ_PRIO ? rq1 : rq2;
 
 	s1 = blk_rq_pos(rq1);
 	s2 = blk_rq_pos(rq2);
@@ -1612,9 +1612,9 @@ static void cfq_remove_request(struct re
 	cfqq->cfqd->rq_queued--;
 	cfq_blkiocg_update_io_remove_stats(&(RQ_CFQG(rq))->blkg,
 					rq_data_dir(rq), rq_is_sync(rq));
-	if (rq->cmd_flags & REQ_META) {
-		WARN_ON(!cfqq->meta_pending);
-		cfqq->meta_pending--;
+	if (rq->cmd_flags & REQ_PRIO) {
+		WARN_ON(!cfqq->prio_pending);
+		cfqq->prio_pending--;
 	}
 }
 
@@ -3372,7 +3372,7 @@ cfq_should_preempt(struct cfq_data *cfqd
 	 * So both queues are sync. Let the new request get disk time if
 	 * it's a metadata request and the current queue is doing regular IO.
 	 */
-	if ((rq->cmd_flags & REQ_META) && !cfqq->meta_pending)
+	if ((rq->cmd_flags & REQ_PRIO) && !cfqq->prio_pending)
 		return true;
 
 	/*
@@ -3439,8 +3439,8 @@ cfq_rq_enqueued(struct cfq_data *cfqd, s
 	struct cfq_io_context *cic = RQ_CIC(rq);
 
 	cfqd->rq_queued++;
-	if (rq->cmd_flags & REQ_META)
-		cfqq->meta_pending++;
+	if (rq->cmd_flags & REQ_PRIO)
+		cfqq->prio_pending++;
 
 	cfq_update_io_thinktime(cfqd, cfqq, cic);
 	cfq_update_io_seektime(cfqd, cfqq, rq);
Index: linux-2.6/drivers/mmc/card/block.c
===================================================================
--- linux-2.6.orig/drivers/mmc/card/block.c	2011-08-23 02:29:10.830022159 +0200
+++ linux-2.6/drivers/mmc/card/block.c	2011-08-23 10:18:19.430245519 +0200
@@ -926,6 +926,9 @@ static void mmc_blk_rw_rq_prep(struct mm
 	/*
 	 * Reliable writes are used to implement Forced Unit Access and
 	 * REQ_META accesses, and are supported only on MMCs.
+	 *
+	 * XXX: this really needs a good explanation of why REQ_META
+	 * is treated special.
 	 */
 	bool do_rel_wr = ((req->cmd_flags & REQ_FUA) ||
 			  (req->cmd_flags & REQ_META)) &&
Index: linux-2.6/fs/ext3/inode.c
===================================================================
--- linux-2.6.orig/fs/ext3/inode.c	2011-08-23 10:18:18.910248335 +0200
+++ linux-2.6/fs/ext3/inode.c	2011-08-23 10:18:19.433578834 +0200
@@ -1134,7 +1134,7 @@ struct buffer_head *ext3_bread(handle_t
 		return bh;
 	if (buffer_uptodate(bh))
 		return bh;
-	ll_rw_block(READ | REQ_META, 1, &bh);
+	ll_rw_block(READ | REQ_META | REQ_PRIO, 1, &bh);
 	wait_on_buffer(bh);
 	if (buffer_uptodate(bh))
 		return bh;
@@ -2807,7 +2807,7 @@ make_io:
 		trace_ext3_load_inode(inode);
 		get_bh(bh);
 		bh->b_end_io = end_buffer_read_sync;
-		submit_bh(READ | REQ_META, bh);
+		submit_bh(READ | REQ_META | REQ_PRIO, bh);
 		wait_on_buffer(bh);
 		if (!buffer_uptodate(bh)) {
 			ext3_error(inode->i_sb, "ext3_get_inode_loc",
Index: linux-2.6/fs/ext3/namei.c
===================================================================
--- linux-2.6.orig/fs/ext3/namei.c	2011-08-23 10:18:18.910248335 +0200
+++ linux-2.6/fs/ext3/namei.c	2011-08-23 10:18:19.436912149 +0200
@@ -922,7 +922,8 @@ restart:
 				bh = ext3_getblk(NULL, dir, b++, 0, &err);
 				bh_use[ra_max] = bh;
 				if (bh)
-					ll_rw_block(READ | REQ_META, 1, &bh);
+					ll_rw_block(READ | REQ_META | REQ_PRIO,
+						    1, &bh);
 			}
 		}
 		if ((bh = bh_use[ra_ptr++]) == NULL)
Index: linux-2.6/fs/ext4/inode.c
===================================================================
--- linux-2.6.orig/fs/ext4/inode.c	2011-08-23 10:18:18.910248335 +0200
+++ linux-2.6/fs/ext4/inode.c	2011-08-23 10:18:19.440245464 +0200
@@ -650,7 +650,7 @@ struct buffer_head *ext4_bread(handle_t
 		return bh;
 	if (buffer_uptodate(bh))
 		return bh;
-	ll_rw_block(READ | REQ_META, 1, &bh);
+	ll_rw_block(READ | REQ_META | REQ_PRIO, 1, &bh);
 	wait_on_buffer(bh);
 	if (buffer_uptodate(bh))
 		return bh;
@@ -3301,7 +3301,7 @@ make_io:
 		trace_ext4_load_inode(inode);
 		get_bh(bh);
 		bh->b_end_io = end_buffer_read_sync;
-		submit_bh(READ | REQ_META, bh);
+		submit_bh(READ | REQ_META | REQ_PRIO, bh);
 		wait_on_buffer(bh);
 		if (!buffer_uptodate(bh)) {
 			EXT4_ERROR_INODE_BLOCK(inode, block,
Index: linux-2.6/fs/ext4/namei.c
===================================================================
--- linux-2.6.orig/fs/ext4/namei.c	2011-08-23 10:18:18.913581650 +0200
+++ linux-2.6/fs/ext4/namei.c	2011-08-23 10:18:19.443578779 +0200
@@ -922,7 +922,8 @@ restart:
 				bh = ext4_getblk(NULL, dir, b++, 0, &err);
 				bh_use[ra_max] = bh;
 				if (bh)
-					ll_rw_block(READ | REQ_META, 1, &bh);
+					ll_rw_block(READ | REQ_META | REQ_PRIO,
+						    1, &bh);
 			}
 		}
 		if ((bh = bh_use[ra_ptr++]) == NULL)
Index: linux-2.6/fs/gfs2/log.c
===================================================================
--- linux-2.6.orig/fs/gfs2/log.c	2011-08-23 02:29:10.883355202 +0200
+++ linux-2.6/fs/gfs2/log.c	2011-08-23 10:18:19.446912094 +0200
@@ -624,9 +624,9 @@ static void log_write_header(struct gfs2
 	bh->b_end_io = end_buffer_write_sync;
 	get_bh(bh);
 	if (test_bit(SDF_NOBARRIERS, &sdp->sd_flags))
-		submit_bh(WRITE_SYNC | REQ_META, bh);
+		submit_bh(WRITE_SYNC | REQ_META | REQ_PRIO, bh);
 	else
-		submit_bh(WRITE_FLUSH_FUA | REQ_META, bh);
+		submit_bh(WRITE_FLUSH_FUA | REQ_META | REQ_PRIO, bh);
 	wait_on_buffer(bh);
 
 	if (!buffer_uptodate(bh))
Index: linux-2.6/fs/gfs2/meta_io.c
===================================================================
--- linux-2.6.orig/fs/gfs2/meta_io.c	2011-08-23 02:29:10.890021834 +0200
+++ linux-2.6/fs/gfs2/meta_io.c	2011-08-23 10:18:19.446912094 +0200
@@ -37,7 +37,7 @@ static int gfs2_aspace_writepage(struct
 {
 	struct buffer_head *bh, *head;
 	int nr_underway = 0;
-	int write_op = REQ_META |
+	int write_op = REQ_META | REQ_PRIO |
 		(wbc->sync_mode == WB_SYNC_ALL ? WRITE_SYNC : WRITE);
 
 	BUG_ON(!PageLocked(page));
@@ -225,7 +225,7 @@ int gfs2_meta_read(struct gfs2_glock *gl
 	}
 	bh->b_end_io = end_buffer_read_sync;
 	get_bh(bh);
-	submit_bh(READ_SYNC | REQ_META, bh);
+	submit_bh(READ_SYNC | REQ_META | REQ_PRIO, bh);
 	if (!(flags & DIO_WAIT))
 		return 0;
 
@@ -435,7 +435,7 @@ struct buffer_head *gfs2_meta_ra(struct
 	if (buffer_uptodate(first_bh))
 		goto out;
 	if (!buffer_locked(first_bh))
-		ll_rw_block(READ_SYNC | REQ_META, 1, &first_bh);
+		ll_rw_block(READ_SYNC | REQ_META | REQ_PRIO, 1, &first_bh);
 
 	dblock++;
 	extlen--;
Index: linux-2.6/fs/gfs2/ops_fstype.c
===================================================================
--- linux-2.6.orig/fs/gfs2/ops_fstype.c	2011-08-23 02:29:10.896688465 +0200
+++ linux-2.6/fs/gfs2/ops_fstype.c	2011-08-23 10:18:19.450245409 +0200
@@ -224,7 +224,7 @@ static int gfs2_read_super(struct gfs2_s
 
 	bio->bi_end_io = end_bio_io_page;
 	bio->bi_private = page;
-	submit_bio(READ_SYNC | REQ_META, bio);
+	submit_bio(READ_SYNC | REQ_META | REQ_PRIO, bio);
 	wait_on_page_locked(page);
 	bio_put(bio);
 	if (!PageUptodate(page)) {
Index: linux-2.6/fs/gfs2/quota.c
===================================================================
--- linux-2.6.orig/fs/gfs2/quota.c	2011-08-23 10:18:18.916914965 +0200
+++ linux-2.6/fs/gfs2/quota.c	2011-08-23 10:18:19.450245409 +0200
@@ -709,7 +709,7 @@ get_a_page:
 		set_buffer_uptodate(bh);
 
 	if (!buffer_uptodate(bh)) {
-		ll_rw_block(READ | REQ_META, 1, &bh);
+		ll_rw_block(READ | REQ_META | REQ_PRIO, 1, &bh);
 		wait_on_buffer(bh);
 		if (!buffer_uptodate(bh))
 			goto unlock_out;
Index: linux-2.6/include/linux/blk_types.h
===================================================================
--- linux-2.6.orig/include/linux/blk_types.h	2011-08-23 02:29:10.903355095 +0200
+++ linux-2.6/include/linux/blk_types.h	2011-08-23 10:18:45.196772595 +0200
@@ -124,6 +124,7 @@ enum rq_flag_bits {
 
 	__REQ_SYNC,		/* request is sync (sync write or read) */
 	__REQ_META,		/* metadata io request */
+	__REQ_PRIO,		/* boost priority in cfq */
 	__REQ_DISCARD,		/* request to discard sectors */
 	__REQ_SECURE,		/* secure discard (used with __REQ_DISCARD) */
 
@@ -161,14 +162,15 @@ enum rq_flag_bits {
 #define REQ_FAILFAST_DRIVER	(1 << __REQ_FAILFAST_DRIVER)
 #define REQ_SYNC		(1 << __REQ_SYNC)
 #define REQ_META		(1 << __REQ_META)
+#define REQ_PRIO		(1 << __REQ_PRIO)
 #define REQ_DISCARD		(1 << __REQ_DISCARD)
 #define REQ_NOIDLE		(1 << __REQ_NOIDLE)
 
 #define REQ_FAILFAST_MASK \
 	(REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER)
 #define REQ_COMMON_MASK \
-	(REQ_WRITE | REQ_FAILFAST_MASK | REQ_SYNC | REQ_META | REQ_DISCARD | \
-	 REQ_NOIDLE | REQ_FLUSH | REQ_FUA | REQ_SECURE)
+	(REQ_WRITE | REQ_FAILFAST_MASK | REQ_SYNC | REQ_META | REQ_PRIO | \
+	 REQ_DISCARD | REQ_NOIDLE | REQ_FLUSH | REQ_FUA | REQ_SECURE)
 #define REQ_CLONE_MASK		REQ_COMMON_MASK
 
 #define REQ_RAHEAD		(1 << __REQ_RAHEAD)

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

* Re: [PATCH 2/2 v2] block: separate priority boosting from REQ_META
  2011-08-23 10:09             ` [PATCH 2/2 v2] " Christoph Hellwig
@ 2011-08-23 12:31               ` Namhyung Kim
  2011-08-23 12:52               ` Jens Axboe
  1 sibling, 0 replies; 14+ messages in thread
From: Namhyung Kim @ 2011-08-23 12:31 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Jens Axboe, Linus Torvalds, linux-kernel

2011-08-23 (화), 06:09 -0400, Christoph Hellwig:
> Add a new REQ_PRIO to let requests preempt others in the cfq I/O schedule,
> and lave REQ_META purely for marking requests as metadata in blktrace.
> 
> All existing callers of REQ_META except for XFS are updated to also
> set REQ_PRIO for now.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Reviewed-by: Namhyung Kim <namhyung@gmail.com>

Thanks.


-- 
Regards,
Namhyung Kim



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

* Re: [PATCH 2/2 v2] block: separate priority boosting from REQ_META
  2011-08-23 10:09             ` [PATCH 2/2 v2] " Christoph Hellwig
  2011-08-23 12:31               ` Namhyung Kim
@ 2011-08-23 12:52               ` Jens Axboe
  1 sibling, 0 replies; 14+ messages in thread
From: Jens Axboe @ 2011-08-23 12:52 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Namhyung Kim, Linus Torvalds, linux-kernel

On 2011-08-23 12:09, Christoph Hellwig wrote:
> Add a new REQ_PRIO to let requests preempt others in the cfq I/O schedule,
> and lave REQ_META purely for marking requests as metadata in blktrace.
> 
> All existing callers of REQ_META except for XFS are updated to also
> set REQ_PRIO for now.

Thanks, applied 1/2 and this one to for-linus.

-- 
Jens Axboe


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

end of thread, other threads:[~2011-08-23 12:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-19 13:16 [GIT PULL] block bits for 3.1-rc Jens Axboe
2011-08-19 17:50 ` Linus Torvalds
2011-08-19 17:57   ` Jens Axboe
2011-08-20 17:41 ` Christoph Hellwig
2011-08-20 19:15   ` Mike Snitzer
2011-08-21 17:56   ` Jens Axboe
2011-08-21 18:19     ` Christoph Hellwig
2011-08-21 18:37       ` Jens Axboe
2011-08-22 16:52         ` [PATCH 1/2] block: remove READ_META and WRITE_META Christoph Hellwig
2011-08-22 16:52         ` [PATCH 2/2] block: separate priority boosting from REQ_META Christoph Hellwig
2011-08-23  2:05           ` Namhyung Kim
2011-08-23 10:09             ` [PATCH 2/2 v2] " Christoph Hellwig
2011-08-23 12:31               ` Namhyung Kim
2011-08-23 12:52               ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.