Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757983Ab2FZFxj (ORCPT ); Tue, 26 Jun 2012 01:53:39 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:59226 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757744Ab2FZFxg (ORCPT ); Tue, 26 Jun 2012 01:53:36 -0400 X-SecurityPolicyCheck: OK by SHieldMailChecker v1.7.4 Message-ID: <4FE94DD3.5060404@jp.fujitsu.com> Date: Tue, 26 Jun 2012 14:51:15 +0900 From: Kamezawa Hiroyuki User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: Glauber Costa CC: cgroups@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org, Frederic Weisbecker , David Rientjes , Pekka Enberg , Michal Hocko , Johannes Weiner , Christoph Lameter , devel@openvz.org, Tejun Heo , Pekka Enberg , Suleiman Souhlal Subject: Re: [PATCH 08/11] memcg: disable kmem code when not in use. References: <1340633728-12785-1-git-send-email-glommer@parallels.com> <1340633728-12785-9-git-send-email-glommer@parallels.com> In-Reply-To: <1340633728-12785-9-git-send-email-glommer@parallels.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: 1158 Lines: 29 (2012/06/25 23:15), Glauber Costa wrote: > We can use jump labels to patch the code in or out > when not used. > > Because the assignment: memcg->kmem_accounted = true > is done after the jump labels increment, we guarantee > that the root memcg will always be selected until > all call sites are patched (see mem_cgroup_kmem_enabled). > This guarantees that no mischarges are applied. > > Jump label decrement happens when the last reference > count from the memcg dies. This will only happen when > the caches are all dead. > > Signed-off-by: Glauber Costa > CC: Christoph Lameter > CC: Pekka Enberg > CC: Michal Hocko > CC: Kamezawa Hiroyuki > CC: Johannes Weiner > CC: Suleiman Souhlal Acked-by: KAMEZAWA Hiroyuki -- 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/