diff mbox

Re: [PATCH] io-controller: implement per group request allocation limitation

Message ID 4A7796D2.4030104@ds.jp.nec.com (mailing list archive)
State New, archived
Headers show

Commit Message

IKEDA, Munehiro Aug. 4, 2009, 2:02 a.m. UTC
Gui Jianfeng wrote, on 07/09/2009 09:56 PM:
> Hi Vivek,
>
> This patch exports a cgroup based per group request limits interface.
> and removes the global one. Now we can use this interface to perform
> different request allocation limitation for different groups.
>
> Signed-off-by: Gui Jianfeng<guijianfeng@cn.fujitsu.com>
> ---
(snip)

Hi Jianfeng,

If this helps.

If calling elv_io_group_congestion_threshold() before
setting iog->iocg_id, iocg->nr_group_requests cannot be
referred.  As a result of it, iog->nr_congestion_on is
always misculculated as 0.
This patch moves the calling of
elv_io_group_congestion_threshold() after setting
iog->iocg_id.

Signed-off-by: Munehiro "Muuhh" Ikeda <m-ikeda@ds.jp.nec.com>
---
  block/elevator-fq.c |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Gui Jianfeng Aug. 4, 2009, 6:41 a.m. UTC | #1
Munehiro Ikeda wrote:
> Gui Jianfeng wrote, on 07/09/2009 09:56 PM:
>> Hi Vivek,
>>
>> This patch exports a cgroup based per group request limits interface.
>> and removes the global one. Now we can use this interface to perform
>> different request allocation limitation for different groups.
>>
>> Signed-off-by: Gui Jianfeng<guijianfeng@cn.fujitsu.com>
>> ---
> (snip)
> 
> Hi Jianfeng,
> 
> If this helps.
> 
> If calling elv_io_group_congestion_threshold() before
> setting iog->iocg_id, iocg->nr_group_requests cannot be
> referred.  As a result of it, iog->nr_congestion_on is
> always misculculated as 0.
> This patch moves the calling of
> elv_io_group_congestion_threshold() after setting
> iog->iocg_id.
> 
> Signed-off-by: Munehiro "Muuhh" Ikeda <m-ikeda@ds.jp.nec.com>

  That's true, thanks.
diff mbox

Patch

diff --git a/block/elevator-fq.c b/block/elevator-fq.c
index 7c83d1e..3368a7f 100644
--- a/block/elevator-fq.c
+++ b/block/elevator-fq.c
@@ -2195,7 +2195,6 @@  static struct io_group *io_alloc_root_group(struct request_queue *q,
  		iog->sched_data.service_tree[i] = IO_SERVICE_TREE_INIT;
  
  	blk_init_request_list(&iog->rl);
-	elv_io_group_congestion_threshold(q, iog);
  
  	iocg = &io_root_cgroup;
  	spin_lock_irq(&iocg->lock);
@@ -2204,6 +2203,8 @@  static struct io_group *io_alloc_root_group(struct request_queue *q,
  	iog->iocg_id = css_id(&iocg->css);
  	spin_unlock_irq(&iocg->lock);
  
+	elv_io_group_congestion_threshold(q, iog);
+
  #ifdef CONFIG_DEBUG_GROUP_IOSCHED
  	io_group_path(iog, iog->path, sizeof(iog->path));
  #endif