Skip to content

Commit 69d60eb

Browse files
rhvgoyalJens Axboe
authored andcommitted
blk-throttle: Use blk_plug in throttle dispatch
Use plug in throttle dispatch also as we are dispatching a bunch of bios in throttle context and some of them might merge. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
1 parent 721a960 commit 69d60eb

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎block/blk-throttle.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,7 @@ static int throtl_dispatch(struct request_queue *q)
770770
unsigned int nr_disp = 0;
771771
struct bio_list bio_list_on_stack;
772772
struct bio *bio;
773+
struct blk_plug plug;
773774

774775
spin_lock_irq(q->queue_lock);
775776

@@ -798,8 +799,10 @@ static int throtl_dispatch(struct request_queue *q)
798799
* immediate dispatch
799800
*/
800801
if (nr_disp) {
802+
blk_start_plug(&plug);
801803
while((bio = bio_list_pop(&bio_list_on_stack)))
802804
generic_make_request(bio);
805+
blk_finish_plug(&plug);
803806
}
804807
return nr_disp;
805808
}

0 commit comments

Comments
 (0)