Re: [PATCH 2/2] block: separate priority boosting from REQ_META

From: Namhyung Kim
Date: Mon Aug 22 2011 - 22:06:09 EST


Hello,


Christoph Hellwig <hch@xxxxxxxxxxxxx> 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@xxxxxx>
>

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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/