diff mbox

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

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

Commit Message

IKEDA, Munehiro Aug. 4, 2009, 2:04 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, again.

A patch posted from Gui Jianfeng on 2009/07/09 adds per-cgroup
nr_requests control by io.nr_group_requests.  The patch missed to update
iog->nr_congestion_{on|off} and this patch adds the missing-link.

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

Comments

Gui Jianfeng Aug. 4, 2009, 6:45 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, again.
> 
> A patch posted from Gui Jianfeng on 2009/07/09 adds per-cgroup
> nr_requests control by io.nr_group_requests.  The patch missed to update
> iog->nr_congestion_{on|off} and this patch adds the missing-link.
> 
> Signed-off-by: Munehiro "Muuhh" Ikeda <m-ikeda@ds.jp.nec.com>

  Yes, i'v fixed this issue for the global nr_group_requests updating in V6,
  but forgot to update it in this patch. Thanks :)
diff mbox

Patch

diff --git a/block/elevator-fq.c b/block/elevator-fq.c
index 673e490..316bd8d 100644
--- a/block/elevator-fq.c
+++ b/block/elevator-fq.c
@@ -1607,6 +1607,10 @@  static int io_cgroup_nr_requests_write(struct cgroup *cgroup,
  					u64 val)
  {
  	struct io_cgroup *iocg;
+	struct io_group *iog;
+	struct elv_fq_data *efqd;
+	struct request_queue *q;
+	struct hlist_node *n;
  
  	if (val < BLKDEV_MIN_RQ)
  		val = BLKDEV_MIN_RQ;
@@ -1618,6 +1622,13 @@  static int io_cgroup_nr_requests_write(struct cgroup *cgroup,
  
  	spin_lock_irq(&iocg->lock);
  	iocg->nr_group_requests = (unsigned long)val;
+	hlist_for_each_entry(iog, n, &iocg->group_data, group_node) {
+		rcu_read_lock();
+		efqd = rcu_dereference(iog->key);
+		q = efqd->queue;
+		rcu_read_unlock();
+		elv_io_group_congestion_threshold(q, iog);
+	}
  	spin_unlock_irq(&iocg->lock);
  
  	cgroup_unlock();