From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751650Ab2I0Neq (ORCPT ); Thu, 27 Sep 2012 09:34:46 -0400 Received: from cantor2.suse.de ([195.135.220.15]:43230 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750759Ab2I0Neo (ORCPT ); Thu, 27 Sep 2012 09:34:44 -0400 Date: Thu, 27 Sep 2012 14:34:35 +0100 From: Mel Gorman To: Glauber Costa Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, kamezawa.hiroyu@jp.fujitsu.com, devel@openvz.org, Tejun Heo , linux-mm@kvack.org, Suleiman Souhlal , Frederic Weisbecker , David Rientjes , Christoph Lameter , Pekka Enberg , Michal Hocko , Johannes Weiner , Rik van Riel , Mel Gorman Subject: Re: [PATCH v3 05/13] Add a __GFP_KMEMCG flag Message-ID: <20120927133435.GE3429@suse.de> References: <1347977050-29476-1-git-send-email-glommer@parallels.com> <1347977050-29476-6-git-send-email-glommer@parallels.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1347977050-29476-6-git-send-email-glommer@parallels.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 18, 2012 at 06:04:02PM +0400, Glauber Costa wrote: > This flag is used to indicate to the callees that this allocation is a > kernel allocation in process context, and should be accounted to > current's memcg. It takes numerical place of the of the recently removed > __GFP_NO_KSWAPD. > > Signed-off-by: Glauber Costa > CC: Christoph Lameter > CC: Pekka Enberg > CC: Michal Hocko > CC: Johannes Weiner > CC: Suleiman Souhlal > CC: Rik van Riel > CC: Mel Gorman > Acked-by: Kamezawa Hiroyuki I agree with Christophs recommendation that this flag always exist instead of being 0 in the !MEMCG_KMEM case. If __GFP_KMEMCG ever is used in another part of the VM (which would be unexpected but still) then the behaviour might differ too much between MEMCG_KMEM and !MEMCG_KMEM cases. As unlikely as the case is, it's not impossible. For tracing __GFP_KMEMCG should have an entry in include/trace/events/gfpflags.h Get rid of the CONFIG_MEMCG_KMEM check and update include/trace/events/gfpflags.h and then feel free to stick my Acked-by on it. -- Mel Gorman SUSE Labs