From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx105.postini.com [74.125.245.105]) by kanga.kvack.org (Postfix) with SMTP id 44CA36B0068 for ; Fri, 28 Sep 2012 05:47:33 -0400 (EDT) Message-ID: <50657153.8010101@parallels.com> Date: Fri, 28 Sep 2012 13:43:47 +0400 From: Glauber Costa MIME-Version: 1.0 Subject: Re: [PATCH v3 07/13] mm: Allocate kernel pages to the right memcg References: <1347977050-29476-1-git-send-email-glommer@parallels.com> <1347977050-29476-8-git-send-email-glommer@parallels.com> <20120927135053.GF3429@suse.de> In-Reply-To: <20120927135053.GF3429@suse.de> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Mel Gorman 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 On 09/27/2012 05:50 PM, Mel Gorman wrote: >> +void __free_accounted_pages(struct page *page, unsigned int order) >> > +{ >> > + memcg_kmem_uncharge_page(page, order); >> > + __free_pages(page, order); >> > +} >> > + >> > +void free_accounted_pages(unsigned long addr, unsigned int order) >> > +{ >> > + if (addr != 0) { >> > + VM_BUG_ON(!virt_addr_valid((void *)addr)); > This is probably overkill. If it's invalid, the next line is likely to > blow up anyway. It's no biggie. > So this is here because it is in free_pages() as well. If it blows, at least we know precisely why (if debugging), and VM_BUG_ON() is only compiled in when CONFIG_DEBUG_VM. But I'm fine with either. Should it stay or should it go ? -- 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