aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-throttle.c
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2011-03-07 15:05:14 -0500
committerJens Axboe <jaxboe@fusionio.com>2011-03-07 15:05:14 -0500
commit231d704b4ab7491473c0b1a9cd0c6e0d1cba85b9 (patch)
treea4666d35b6e11f92eb0fc4506bdd7f65185a7aa6 /block/blk-throttle.c
parentb873c5d692d4d5453cceed18bb06c62bb1a73ac0 (diff)
blk-throttle: process limit change only through one function
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>
Diffstat (limited to 'block/blk-throttle.c')
-rw-r--r--block/blk-throttle.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 061dee66e2a6..a29f09240c0f 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -1009,14 +1009,8 @@ int blk_throtl_bio(struct request_queue *q, struct bio **biop)
1009 /* 1009 /*
1010 * There is already another bio queued in same dir. No 1010 * There is already another bio queued in same dir. No
1011 * need to update dispatch time. 1011 * need to update dispatch time.
1012 * Still update the disptime if rate limits on this group
1013 * were changed.
1014 */ 1012 */
1015 if (!tg->limits_changed) 1013 update_disptime = false;
1016 update_disptime = false;
1017 else
1018 tg->limits_changed = false;
1019
1020 goto queue_bio; 1014 goto queue_bio;
1021 } 1015 }
1022 1016