[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c2cf91864adcd1461b14f491dcafd17e.squirrel@webmail-b.css.fujitsu.com>
Date: Fri, 23 Jan 2009 18:49:57 +0900 (JST)
From: "KAMEZAWA Hiroyuki" <kamezawa.hiroyu@...fujitsu.com>
To: "Daisuke Nishimura" <nishimura@....nes.nec.co.jp>
Cc: "KAMEZAWA Hiroyuki" <kamezawa.hiroyu@...fujitsu.com>,
nishimura@....nes.nec.co.jp,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"menage@...gle.com" <menage@...gle.com>,
"lizf@...fujitsu.com" <lizf@...fujitsu.com>,
"balbir@...ux.vnet.ibm.com" <balbir@...ux.vnet.ibm.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/7] memcg : use CSS ID in memcg
Daisuke Nishimura さんは書きました:
> On Thu, 22 Jan 2009 18:35:57 +0900, KAMEZAWA Hiroyuki
> <kamezawa.hiroyu@...fujitsu.com> wrote:
>>
>> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
>> Use css ID in memcg.
>>
>> Assigning CSS ID for each memcg and use css_get_next() for scanning
>> hierarchy.
>>
>> Assume folloing tree.
>>
>> group_A (ID=3)
>> /01 (ID=4)
>> /0A (ID=7)
>> /02 (ID=10)
>> group_B (ID=5)
>> and task in group_A/01/0A hits limit at group_A.
>>
>> reclaim will be done in following order (round-robin).
>> group_A(3) -> group_A/01 (4) -> group_A/01/0A (7) -> group_A/02(10)
>> -> group_A -> .....
>>
>> Round robin by ID. The last visited cgroup is recorded and restart
>> from it when it start reclaim again.
>> (More smart algorithm can be implemented..)
>>
>> No cgroup_mutex or hierarchy_mutex is required.
>>
>> Changelog (v3) -> (v4)
>> - dropped css_is_populated() check
>> - removed scan_age and use more simple logic.
>>
> I think a check for mem_cgroup_local_usage is also added by this version
> :)
>
>> Changelog (v2) -> (v3)
>> - Added css_is_populatd() check
>> - Adjusted to rc1 + Nishimrua's fixes.
>> - Increased comments.
>>
>> Changelog (v1) -> (v2)
>> - Updated texts.
>>
>> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
>>
>> ---
>> mm/memcontrol.c | 220
>> ++++++++++++++++++++------------------------------------
>> 1 file changed, 82 insertions(+), 138 deletions(-)
>>
>> Index: mmotm-2.6.29-Jan16/mm/memcontrol.c
>> ===================================================================
>> --- mmotm-2.6.29-Jan16.orig/mm/memcontrol.c
>> +++ mmotm-2.6.29-Jan16/mm/memcontrol.c
>> @@ -95,6 +95,15 @@ static s64 mem_cgroup_read_stat(struct m
>> return ret;
>> }
>>
>> +static s64 mem_cgroup_local_usage(struct mem_cgroup_stat *stat)
>> +{
>> + s64 ret;
>> +
> It would be better to initialize it to 0.
>
Hmm ? why ?
> Reviewed-by: Daisuke Nishimura <nishimura@....nes.nec.co.jp>
>
> Thanks,
> Daisuke Nishimura.
>
Thanks,
-Kame
>> + ret = mem_cgroup_read_stat(stat, MEM_CGROUP_STAT_CACHE);
>> + ret += mem_cgroup_read_stat(stat, MEM_CGROUP_STAT_RSS);
>> + return ret;
>> +}
>> +
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists