lkml.org 
[lkml]   [2010]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] blk-throttle: process limit change only through one function
Date
o 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.

o 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>
---
block/blk-throttle.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 381b09b..91bd444 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -998,14 +998,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;
}

--
1.7.1


\
 
 \ /
  Last update: 2010-12-15 22:11    [W:1.105 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site