Re: [PATCH v3 3/4] memcg: optimize memcg_get_hierarchical_limit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 25, 2012 at 06:52:25PM +0900, Kamezawa Hiroyuki wrote:
>(2012/06/25 17:44), Wanpeng Li wrote:
>> From: Wanpeng Li <liwp@xxxxxxxxxxxxxxxxxx>
>> 
>> Optimize memcg_get_hierarchical_limit to save cpu cycle.
>> 
>> Signed-off-by: Wanpeng Li <liwp.linux@xxxxxxxxx>
>
>I can't understand the benefit of this patch to the real world...
>
>So, if you wrote the patch description as "clean up" rather than optimize,
>ok, I'll agree.
OK, I will change to "Cleanup". Thank you Kame.

Best Regards,
Wanpeng Li

>
>Thanks,
>-Kame
>
>> ---
>>   mm/memcontrol.c |    2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
>> index 2e81328..4520b57 100644
>> --- a/mm/memcontrol.c
>> +++ b/mm/memcontrol.c
>> @@ -3917,9 +3917,9 @@ static void memcg_get_hierarchical_limit(struct mem_cgroup *memcg,
>>   
>>   	min_limit = res_counter_read_u64(&memcg->res, RES_LIMIT);
>>   	min_memsw_limit = res_counter_read_u64(&memcg->memsw, RES_LIMIT);
>> -	cgroup = memcg->css.cgroup;
>>   	if (!memcg->use_hierarchy)
>>   		goto out;
>> +	cgroup = memcg->css.cgroup;
>>   
>>   	while (cgroup->parent) {
>>   		cgroup = cgroup->parent;
>> 
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux