blk-throttle: Fix calculation of max number of WRITES to be dispatched
Subsystems (2)
PATCH 1/1 blk-throttle: Fix calculation of max number of WRITES to be dispatched
o Currently we try to dispatch more READS and less WRITES (75%, 25%) in one dispatch round. ummy pointed out that there is a bug in max_nr_writes calculation. This patch fixes it.
--- block/blk-throttle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-throttle.c +1 -1
@@ -645,7 +645,7 @@ static int throtl_dispatch_tg(struct thr {unsigned int nr_reads =0 , nr_writes =0 ;unsigned int max_nr_reads = throtl_grp_quantum*3 /4 ; -unsigned int max_nr_writes = throtl_grp_quantum - nr_reads; +unsigned int max_nr_writes = throtl_grp_quantum - max_nr_reads;struct bio *bio;/* Try to dispatch 75% READS and 25% WRITES */
Quoted 7 lines · Vivek Goyal
o Currently we try to dispatch more READS and less WRITES (75%, 25%) in one dispatch round. ummy pointed out that there is a bug in
max_nr_writescalculation. This patch fixes it.Reported-by ummy y <[email protected]>Signed-off-by Vivek Goyal <[email protected]>---
Hi Jens,
Do you have any concerns about this patch? If not, can you please apply it.
Thanks
Vivek
Quoted 16 lines
block/blk-throttle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Index:
linux-2.6/block/blk-throttle.c
===================================================================block/blk-throttle.c +1
-1@@ -645,7 +645,7 @@ static int throtl_dispatch_tg(struct thr {unsigned int nr_reads =0 , nr_writes =0 ;unsigned int max_nr_reads = throtl_grp_quantum*3 /4 ; -unsigned int max_nr_writes = throtl_grp_quantum - nr_reads; +unsigned int max_nr_writes = throtl_grp_quantum - max_nr_reads;struct bio *bio;/* Try to dispatch 75% READS and 25% WRITES */
Jens Axboe
AppliedQuoted 5 lines · Vivek Goyal
Quoted 4 lines · Vivek Goyal
o Currently we try to dispatch more READS and less WRITES (75%, 25%) in one dispatch round. ummy pointed out that there is a bug in
max_nr_writescalculation. This patch fixes it.
Quoted 8 lines
Quoted 3 lines
Reported-by ummy y <[email protected]>Signed-off-by Vivek Goyal <[email protected]>---
Hi Jens,
Do you have any concerns about this patch? If not, can you please apply it.
Applied, thanks.
Signature · 1 line
Jens Axboe