[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1345647560-30387-35-git-send-email-aarcange@redhat.com>
Date: Wed, 22 Aug 2012 16:59:18 +0200
From: Andrea Arcangeli <aarcange@...hat.com>
To: linux-kernel@...r.kernel.org, linux-mm@...ck.org
Cc: Hillf Danton <dhillf@...il.com>, Dan Smith <danms@...ibm.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...e.hu>, Paul Turner <pjt@...gle.com>,
Suresh Siddha <suresh.b.siddha@...el.com>,
Mike Galbraith <efault@....de>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Lai Jiangshan <laijs@...fujitsu.com>,
Bharata B Rao <bharata.rao@...il.com>,
Lee Schermerhorn <Lee.Schermerhorn@...com>,
Rik van Riel <riel@...hat.com>,
Johannes Weiner <hannes@...xchg.org>,
Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>,
Christoph Lameter <cl@...ux.com>,
Alex Shi <alex.shi@...el.com>,
Mauricio Faria de Oliveira <mauricfo@...ux.vnet.ibm.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Don Morris <don.morris@...com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>
Subject: [PATCH 34/36] autonuma: make the AUTONUMA_SCAN_PMD_FLAG conditional to CONFIG_HAVE_ARCH_AUTONUMA_SCAN_PMD
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 <aarcange@...hat.com>
---
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<<AUTONUMA_ENABLED_FLAG)
#endif
- |(0<<AUTONUMA_SCAN_PMD_FLAG);
+#ifdef CONFIG_HAVE_ARCH_AUTONUMA_SCAN_PMD
+ |(1<<AUTONUMA_SCAN_PMD_FLAG)
+#endif
+ ;
static DEFINE_MUTEX(knumad_mm_mutex);
@@ -1300,7 +1303,9 @@ static ssize_t NAME ## _store(struct kobject *kobj, \
static struct kobj_attribute NAME ## _attr = \
__ATTR(NAME, 0644, NAME ## _show, NAME ## _store);
+#ifdef CONFIG_HAVE_ARCH_AUTONUMA_SCAN_PMD
SYSFS_ENTRY(pmd, AUTONUMA_SCAN_PMD_FLAG);
+#endif /* CONFIG_HAVE_ARCH_AUTONUMA_SCAN_PMD */
SYSFS_ENTRY(debug, AUTONUMA_DEBUG_FLAG);
#ifdef CONFIG_DEBUG_VM
SYSFS_ENTRY(load_balance_strict, AUTONUMA_SCHED_LOAD_BALANCE_STRICT_FLAG);
@@ -1398,7 +1403,9 @@ static struct attribute *knuma_scand_attr[] = {
&pages_to_scan_attr.attr,
&pages_scanned_attr.attr,
&full_scans_attr.attr,
+#ifdef CONFIG_HAVE_ARCH_AUTONUMA_SCAN_PMD
&pmd_attr.attr,
+#endif
NULL,
};
static struct attribute_group knuma_scand_attr_group = {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists