Skip to content

Commit

Permalink
blk-throttle: process limit change only through one function
Browse files Browse the repository at this point in the history
With the help of cgroup interface one can go and upate the bps/iops
limits of existing group. Once the limits are udpated, a thread is
woken up to see if some blocked group needs recalculation based on new
limits and needs to be requeued.

There was also a piece of code where I was checking for group limit
update when a fresh bio comes in. This patch gets rid of that piece of
code and keeps processing the limit change at one place
throtl_process_limit_change().  It just keeps the code simple and easy
to understand.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
  • Loading branch information
Vivek Goyal authored and Jens Axboe committed Mar 7, 2011
1 parent b873c5d commit 231d704
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions block/blk-throttle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,14 +1009,8 @@ int blk_throtl_bio(struct request_queue *q, struct bio **biop)
/*
* There is already another bio queued in same dir. No
* need to update dispatch time.
* Still update the disptime if rate limits on this group
* were changed.
*/
if (!tg->limits_changed)
update_disptime = false;
else
tg->limits_changed = false;

update_disptime = false;
goto queue_bio;
}

Expand Down

0 comments on commit 231d704

Please sign in to comment.