From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758194Ab2GLT6x (ORCPT ); Thu, 12 Jul 2012 15:58:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56209 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756026Ab2GLT6u (ORCPT ); Thu, 12 Jul 2012 15:58:50 -0400 Date: Thu, 12 Jul 2012 21:58:15 +0200 From: Andrea Arcangeli To: Rik van Riel Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Hillf Danton , Dan Smith , Peter Zijlstra , Linus Torvalds , Andrew Morton , Thomas Gleixner , Ingo Molnar , Paul Turner , Suresh Siddha , Mike Galbraith , "Paul E. McKenney" , Lai Jiangshan , Bharata B Rao , Lee Schermerhorn , Johannes Weiner , Srivatsa Vaddagiri , Christoph Lameter , Alex Shi , Mauricio Faria de Oliveira , Konrad Rzeszutek Wilk , Don Morris , Benjamin Herrenschmidt Subject: Re: [PATCH 36/40] autonuma: page_autonuma Message-ID: <20120712195815.GQ20382@redhat.com> References: <1340888180-15355-1-git-send-email-aarcange@redhat.com> <1340888180-15355-37-git-send-email-aarcange@redhat.com> <4FF14196.6040106@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FF14196.6040106@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 02, 2012 at 02:37:10AM -0400, Rik van Riel wrote: > > +fail: > > + printk(KERN_CRIT "allocation of page_autonuma failed.\n"); > > + printk(KERN_CRIT "please try the 'noautonuma' boot option\n"); > > + panic("Out of memory"); > > +} > > The system can run just fine without autonuma. > > Would it make sense to simply disable autonuma at this point, > but to try continue running? BTW, the same would apply to mm/page_cgroup.c, but I think the idea here is that something serious went wrong. Workaround with noautonuma boot option is enough. > > > @@ -700,8 +780,14 @@ static void free_section_usemap(struct page *memmap, unsigned long *usemap) > > */ > > if (PageSlab(usemap_page)) { > > kfree(usemap); > > - if (memmap) > > + if (memmap) { > > __kfree_section_memmap(memmap, PAGES_PER_SECTION); > > + if (!autonuma_impossible()) > > + __kfree_section_page_autonuma(page_autonuma, > > + PAGES_PER_SECTION); > > + else > > + BUG_ON(page_autonuma); > > VM_BUG_ON ? > > > + if (!autonuma_impossible()) { > > + struct page *page_autonuma_page; > > + page_autonuma_page = virt_to_page(page_autonuma); > > + free_map_bootmem(page_autonuma_page, nr_pages); > > + } else > > + BUG_ON(page_autonuma); > > ditto > > > pgdat_resize_unlock(pgdat,&flags); > > if (ret<= 0) { > > + if (!autonuma_impossible()) > > + __kfree_section_page_autonuma(page_autonuma, nr_pages); > > + else > > + BUG_ON(page_autonuma); > > VM_BUG_ON ? These only run at the very boot stage, so performance is irrelevant and it's safer to keep them on. The rest was corrected.