From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx102.postini.com [74.125.245.102]) by kanga.kvack.org (Postfix) with SMTP id 7DB5F6B039B for ; Mon, 25 Jun 2012 18:30:18 -0400 (EDT) Message-ID: <4FE8E5D8.80808@parallels.com> Date: Tue, 26 Jun 2012 02:27:36 +0400 From: Glauber Costa MIME-Version: 1.0 Subject: Re: [PATCH 07/11] mm: Allocate kernel pages to the right memcg References: <1340633728-12785-1-git-send-email-glommer@parallels.com> <1340633728-12785-8-git-send-email-glommer@parallels.com> <20120625180747.GE3869@google.com> In-Reply-To: <20120625180747.GE3869@google.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Tejun Heo 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, kamezawa.hiroyu@jp.fujitsu.com, Pekka Enberg , Suleiman Souhlal On 06/25/2012 10:07 PM, Tejun Heo wrote: > On Mon, Jun 25, 2012 at 06:15:24PM +0400, Glauber Costa wrote: >> When a process tries to allocate a page with the __GFP_KMEMCG flag, >> the page allocator will call the corresponding memcg functions to >> validate the allocation. Tasks in the root memcg can always proceed. >> >> To avoid adding markers to the page - and a kmem flag that would >> necessarily follow, as much as doing page_cgroup lookups for no >> reason, whoever is marking its allocations with __GFP_KMEMCG flag >> is responsible for telling the page allocator that this is such an >> allocation at free_pages() time. This is done by the invocation of >> __free_accounted_pages() and free_accounted_pages(). > > Shouldn't we be documenting that in the code somewhere, preferably in > the function comments? > I can certainly do that. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org