Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932767Ab2HVPGR (ORCPT ); Wed, 22 Aug 2012 11:06:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61397 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932635Ab2HVPGJ (ORCPT ); Wed, 22 Aug 2012 11:06:09 -0400 From: Andrea Arcangeli To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Hillf Danton , Dan Smith , 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: [PATCH 34/36] autonuma: make the AUTONUMA_SCAN_PMD_FLAG conditional to CONFIG_HAVE_ARCH_AUTONUMA_SCAN_PMD Date: Wed, 22 Aug 2012 16:59:18 +0200 Message-Id: <1345647560-30387-35-git-send-email-aarcange@redhat.com> In-Reply-To: <1345647560-30387-1-git-send-email-aarcange@redhat.com> References: <1345647560-30387-1-git-send-email-aarcange@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2894 Lines: 96 Remove the sysfs entry /sys/kernel/mm/autonuma/knuma_scand/pmd and force the knuma_scand pmd mode off if CONFIG_HAVE_ARCH_AUTONUMA_SCAN_PMD is not set by the architecture. Enable AutoNUMA for PPC64. Signed-off-by: Andrea Arcangeli --- arch/Kconfig | 3 +++ arch/powerpc/Kconfig | 6 ++++++ arch/x86/Kconfig | 1 + mm/autonuma.c | 9 ++++++++- 4 files changed, 18 insertions(+), 1 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index ee3ed89..6f4f19f 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -284,4 +284,7 @@ config SECCOMP_FILTER config HAVE_ARCH_AUTONUMA bool +config HAVE_ARCH_AUTONUMA_SCAN_PMD + bool + source "kernel/gcov/Kconfig" diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 352f416..73fa908 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -140,6 +140,12 @@ config PPC select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER +# allow AutoNUMA only on PPC64 for now +config PPC_HAVE_ARCH_AUTONUMA + bool + default y if PPC64 + select HAVE_ARCH_AUTONUMA + config EARLY_PRINTK bool default y diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 4cbdfce..f24bff8 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -98,6 +98,7 @@ config X86 select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER select HAVE_ARCH_AUTONUMA + select HAVE_ARCH_AUTONUMA_SCAN_PMD config INSTRUCTION_DECODER def_bool (KPROBES || PERF_EVENTS || UPROBES) diff --git a/mm/autonuma.c b/mm/autonuma.c index a4da3f3..4b7c744 100644 --- a/mm/autonuma.c +++ b/mm/autonuma.c @@ -25,7 +25,10 @@ unsigned long autonuma_flags __read_mostly = #ifdef CONFIG_AUTONUMA_DEFAULT_ENABLED |(1<