Re: [PATCH] blk-throttle: use READ/WRITE directly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 16, 2013 at 06:56:52PM +0800, Hong Zhiguo wrote:
> From: Hong Zhiguo <zhiguohong@xxxxxxxxxxx>
> 
> To save some instructions
> 
I am not sure if this change is worth doing or not. But ofcourse it
is simple enough.

Acked-by: Vivek Goyal <vgoyal@xxxxxxxxxx>

Vivek

> Signed-off-by: Hong Zhiguo <zhiguohong@xxxxxxxxxxx>
> ---
>  block/blk-throttle.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/block/blk-throttle.c b/block/blk-throttle.c
> index 8331aba..f4fb859 100644
> --- a/block/blk-throttle.c
> +++ b/block/blk-throttle.c
> @@ -1120,7 +1120,7 @@ static int throtl_dispatch_tg(struct throtl_grp *tg)
>  	while ((bio = throtl_peek_queued(&sq->queued[READ])) &&
>  	       tg_may_dispatch(tg, bio, NULL)) {
>  
> -		tg_dispatch_one_bio(tg, bio_data_dir(bio));
> +		tg_dispatch_one_bio(tg, READ);
>  		nr_reads++;
>  
>  		if (nr_reads >= max_nr_reads)
> @@ -1130,7 +1130,7 @@ static int throtl_dispatch_tg(struct throtl_grp *tg)
>  	while ((bio = throtl_peek_queued(&sq->queued[WRITE])) &&
>  	       tg_may_dispatch(tg, bio, NULL)) {
>  
> -		tg_dispatch_one_bio(tg, bio_data_dir(bio));
> +		tg_dispatch_one_bio(tg, WRITE);
>  		nr_writes++;
>  
>  		if (nr_writes >= max_nr_writes)
> @@ -1605,9 +1605,9 @@ static void tg_drain_bios(struct throtl_service_queue *parent_sq)
>  		throtl_dequeue_tg(tg);
>  
>  		while ((bio = throtl_peek_queued(&sq->queued[READ])))
> -			tg_dispatch_one_bio(tg, bio_data_dir(bio));
> +			tg_dispatch_one_bio(tg, READ);
>  		while ((bio = throtl_peek_queued(&sq->queued[WRITE])))
> -			tg_dispatch_one_bio(tg, bio_data_dir(bio));
> +			tg_dispatch_one_bio(tg, WRITE);
>  	}
>  }
>  
> -- 
> 1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux