Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752944Ab2HMIEf (ORCPT ); Mon, 13 Aug 2012 04:04:35 -0400 Received: from mx2.parallels.com ([64.131.90.16]:49823 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751777Ab2HMIEd (ORCPT ); Mon, 13 Aug 2012 04:04:33 -0400 Message-ID: <5028B450.9080309@parallels.com> Date: Mon, 13 Aug 2012 12:01:20 +0400 From: Glauber Costa User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: Kamezawa Hiroyuki CC: , , , , Michal Hocko , Johannes Weiner , Andrew Morton , Christoph Lameter , David Rientjes , Pekka Enberg , Pekka Enberg , Suleiman Souhlal Subject: Re: [PATCH v2 09/11] memcg: propagate kmem limiting information to children References: <1344517279-30646-1-git-send-email-glommer@parallels.com> <1344517279-30646-10-git-send-email-glommer@parallels.com> <50254A0A.3080805@jp.fujitsu.com> In-Reply-To: <50254A0A.3080805@jp.fujitsu.com> Content-Type: text/plain; charset="ISO-2022-JP" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 872 Lines: 29 On 08/10/2012 09:51 PM, Kamezawa Hiroyuki wrote: >> + /* >> + * Once enabled, can't be disabled. We could in theory disable >> + * it if we haven't yet created any caches, or if we can shrink >> + * them all to death. But it is not worth the trouble >> + */ >> static_key_slow_inc(&memcg_kmem_enabled_key); >> - memcg->kmem_accounted = true; >> + >> + if (!memcg->use_hierarchy) >> + goto out; >> + >> + for_each_mem_cgroup_tree(iter, memcg) { >> + if (iter == memcg) >> + continue; >> + memcg_kmem_account_parent(iter); >> + } > > Could you add an explanation comment ? > Of course, Kame. Thanks -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/