lkml.org 
[lkml]   [2011]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[Patch] numa: introduce CONFIG_NUMA_SYSFS for drivers/base/node.c
Hi, Andrew,

Do you think my patch below is better?

Thanks!

------------->
Introduce a new Kconfig CONFIG_NUMA_SYSFS for drivers/base/node.c
which just provides sysfs interface, so that when we select
CONFIG_NUMA, we don't have to enable the sysfs interface too.

This by the way fixes a randconfig build error when NUMA && !SYSFS.

Signed-off-by: WANG Cong <amwang@redhat.com>

---
diff --git a/drivers/base/Makefile b/drivers/base/Makefile
index 99a375a..e382338 100644
--- a/drivers/base/Makefile
+++ b/drivers/base/Makefile
@@ -10,7 +10,7 @@ obj-$(CONFIG_HAS_DMA) += dma-mapping.o
obj-$(CONFIG_HAVE_GENERIC_DMA_COHERENT) += dma-coherent.o
obj-$(CONFIG_ISA) += isa.o
obj-$(CONFIG_FW_LOADER) += firmware_class.o
-obj-$(CONFIG_NUMA) += node.o
+obj-$(CONFIG_NUMA_SYSFS) += node.o
obj-$(CONFIG_MEMORY_HOTPLUG_SPARSE) += memory.o
obj-$(CONFIG_SMP) += topology.o
ifeq ($(CONFIG_SYSFS),y)
diff --git a/mm/Kconfig b/mm/Kconfig
index f2f1ca1..77345e7 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -340,6 +340,16 @@ choice
benefit.
endchoice

+config NUMA_SYSFS
+ bool "Enable NUMA sysfs interface for user-space"
+ depends on NUMA
+ depends on SYSFS
+ default y
+ help
+ This enables NUMA sysfs interface, /sys/devices/system/node/*
+ files, for user-space tools, like numactl. If you have enabled
+ NUMA, probably you also need this one.
+
#
# UP and nommu archs use km based percpu allocator
#
\
 
 \ /
  Last update: 2011-08-24 05:39    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog