Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751445Ab2F3FMY (ORCPT ); Sat, 30 Jun 2012 01:12:24 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:35761 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750953Ab2F3FMW (ORCPT ); Sat, 30 Jun 2012 01:12:22 -0400 Date: Sat, 30 Jun 2012 01:12:18 -0400 From: Konrad Rzeszutek Wilk To: Andrea Arcangeli 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 , Rik van Riel , Johannes Weiner , Srivatsa Vaddagiri , Christoph Lameter , Alex Shi , Mauricio Faria de Oliveira , Konrad Rzeszutek Wilk , Don Morris , Benjamin Herrenschmidt Subject: Re: [PATCH 20/40] autonuma: alloc/free/init mm_autonuma Message-ID: <20120630051217.GG3975@localhost.localdomain> References: <1340888180-15355-1-git-send-email-aarcange@redhat.com> <1340888180-15355-21-git-send-email-aarcange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1340888180-15355-21-git-send-email-aarcange@redhat.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 Content-Length: 1434 Lines: 37 On Thu, Jun 28, 2012 at 02:56:00PM +0200, Andrea Arcangeli wrote: > This is where the mm_autonuma structure is being handled. Just like > sched_autonuma, this is only allocated at runtime if the hardware the > kernel is running on has been detected as NUMA. On not NUMA hardware I think the correct wording is "non-NUMA", not "not NUMA". > the memory cost is reduced to one pointer per mm. > > To get rid of the pointer in the each mm, the kernel can be compiled > with CONFIG_AUTONUMA=n. > > Signed-off-by: Andrea Arcangeli > --- > kernel/fork.c | 7 +++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/kernel/fork.c b/kernel/fork.c > index 0adbe09..3e5a0d9 100644 > --- a/kernel/fork.c > +++ b/kernel/fork.c > @@ -527,6 +527,8 @@ static void mm_init_aio(struct mm_struct *mm) > > static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p) > { > + if (unlikely(alloc_mm_autonuma(mm))) > + goto out_free_mm; So reading that I would think that on non-NUMA machines this would fail (since there is nothing to allocate). But that is not the case (I hope!?) Perhaps just make the function not return any values? -- 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/