mm: make CONFIG_NUMA depend on CONFIG_SYSFS
Subsystems (9)
PATCH 1/1 mm: make CONFIG_NUMA depend on CONFIG_SYSFS
On ppc, we got this build error with randconfig:
drivers/built-in.o:(.toc1+0xf90): undefined reference to `vmstat_text': 1 errors in 1 logs
This is due to that it enabled CONFIG_NUMA but not CONFIG_SYSFS.
And the user-space tool numactl depends on sysfs files too.
So, I think it is very reasonable to make CONFIG_NUMA depend on CONFIG_SYSFS.
--- arch/alpha/Kconfig | 1 + arch/ia64/Kconfig | 1 + arch/m32r/Kconfig | 1 + arch/mips/Kconfig | 1 + arch/powerpc/Kconfig | 1 + arch/sh/mm/Kconfig | 1 + arch/sparc/Kconfig | 1 + arch/tile/Kconfig | 1 + arch/x86/Kconfig | 1 + 9 files changed, 9 insertions(+), 0 deletions(-)
arch/alpha/Kconfig +1 -0
@@ -570,6 +570,7 @@ source "mm/Kconfig" config NUMA bool "NUMA Support (EXPERIMENTAL)" depends on DISCONTIGMEM && BROKEN + depends on SYSFS help Say Y to compile the kernel to support NUMA (Non-Uniform Memory Access). This option is for configuring high-end multiprocessor
arch/ia64/Kconfig +1 -0
@@ -450,6 +450,7 @@ config ARCH_DISCONTIGMEM_DEFAULT config NUMA bool "NUMA support" depends on !IA64_HP_SIM && !FLATMEM + depends on SYSFS default y if IA64_SGI_SN2 select ACPI_NUMA if ACPI help
arch/m32r/Kconfig +1 -0
@@ -325,6 +325,7 @@ config NR_CPUS config NUMA bool "Numa Memory Allocation Support" depends on SMP && BROKEN + depends on SYSFS default n config NODES_SHIFT
arch/mips/Kconfig +1 -0
@@ -2072,6 +2072,7 @@ config ARCH_SPARSEMEM_ENABLE config NUMA bool "NUMA Support" depends on SYS_SUPPORTS_NUMA + depends on SYSFS help Say Y to compile the kernel to support NUMA (Non-Uniform Memory Access). This option improves performance on systems with more
arch/powerpc/Kconfig +1 -0
@@ -392,6 +392,7 @@ config IRQ_ALL_CPUS config NUMA bool "NUMA support" depends on PPC64 + depends on SYSFS default y if SMP && PPC_PSERIES config NODES_SHIFT
arch/sh/mm/Kconfig +1 -0
@@ -111,6 +111,7 @@ config VSYSCALL config NUMA bool "Non Uniform Memory Access (NUMA) Support" depends on MMU && SYS_SUPPORTS_NUMA && EXPERIMENTAL + depends on SYSFS default n help Some SH systems have many various memories scattered around
arch/sparc/Kconfig +1 -0
@@ -338,6 +338,7 @@ endchoice config NUMA bool "NUMA support" depends on SPARC64 && SMP + depends on SYSFS config NODES_SHIFT int
arch/tile/Kconfig +1 -0
@@ -187,6 +187,7 @@ config HIGHMEM config NUMA bool # "NUMA Memory Allocation and Scheduler Support" depends on SMP && DISCONTIGMEM + depends on SYSFS default y ---help--- NUMA memory allocation is required for TILE processors
arch/x86/Kconfig +1 -0
@@ -1146,6 +1146,7 @@ config DIRECT_GBPAGES config NUMA bool "Numa Memory Allocation and Scheduler Support" depends on SMP + depends on SYSFS depends on X86_64 || (X86_32 && HIGHMEM64G && (X86_NUMAQ || X86_BIGSMP || X86_SUMMIT && ACPI) && EXPERIMENTAL) default y if (X86_NUMAQ || X86_SUMMIT || X86_BIGSMP) ---help---
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 8 lines · Amerigo Wang
On ppc, we got this build error with randconfig:
drivers/built-in.o:(.toc1+0xf90): undefined reference to `vmstat_text': 1 errors in 1 logs
This is due to that it enabled
CONFIG_NUMAbut notCONFIG_SYSFS.And the user-space tool numactl depends on sysfs files too.
So, I think it is very reasonable to makeCONFIG_NUMAdepend onCONFIG_SYSFS.
Is it? CONFIG_NUMA is useful even without userspace numactl tool, no?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 11 lines · Pekka Enberg
Quoted 8 lines · Amerigo Wang
On ppc, we got this build error with randconfig:
drivers/built-in.o:(.toc1+0xf90): undefined reference to `vmstat_text': 1 errors in 1 logs
This is due to that it enabled
CONFIG_NUMAbut notCONFIG_SYSFS.And the user-space tool numactl depends on sysfs files too.
So, I think it is very reasonable to makeCONFIG_NUMAdepend onCONFIG_SYSFS.Is it?
CONFIG_NUMAis useful even without userspace numactl tool, no?
Yes it is. No direct dependency.
I would rather fix it in ppc.
-Andi
Signature · 8 lines
[email protected] -- Speaking for myself only. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 8 lines · On Mon, 18 Jul 2011 19:09:50 +0200 Andi Kleen wrote:
Quoted 7 lines · Pekka Enberg
Quoted 6 lines · Amerigo Wang
On ppc, we got this build error with randconfig:
drivers/built-in.o:(.toc1+0xf90): undefined reference to `vmstat_text': 1 errors in 1 logs
This is due to that it enabled
CONFIG_NUMAbut notCONFIG_SYSFS.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
And the user-space tool numactl depends on sysfs files too.
So, I think it is very reasonable to makeCONFIG_NUMAdepend onCONFIG_SYSFS.Is it?
CONFIG_NUMAis useful even without userspace numactl tool, no?Yes it is. No direct dependency.
I would rather fix it in ppc.
This isn't a ppc-only error. It happens when CONFIG_PROC_FS is not enabled (or is it CONFIG_SYSFS?).
I reported it for linux-next of 20110526:
when CONFIG_PROC_FS is not enabled:
drivers/built-in.o: In function `node_read_vmstat':
node.c:(.text+0x56ffa): undefined reference to `vmstat_text'
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
ao? 2011a1'07ae??19ae?JPY 01:14, Randy Dunlap a??e??:
Quoted 22 lines · On Mon, 18 Jul 2011 19:09:50 +0200 Andi Kleen wrote:
Quoted 9 lines · Pekka Enberg
Quoted 7 lines · Amerigo Wang
Quoted 6 lines
On ppc, we got this build error with randconfig:
drivers/built-in.o:(.toc1+0xf90): undefined reference to `vmstat_text': 1 errors in 1 logs
This is due to that it enabled
CONFIG_NUMAbut notCONFIG_SYSFS.Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
And the user-space tool numactl depends on sysfs files too.
So, I think it is very reasonable to makeCONFIG_NUMAdepend onCONFIG_SYSFS.Is it?
CONFIG_NUMAis useful even without userspace numactl tool, no?Yes it is. No direct dependency.
I would rather fix it in ppc.
This isn't a ppc-only error. It happens when
CONFIG_PROC_FSis not enabled (or is itCONFIG_SYSFS?).
Quoted 7 lines
I reported it for linux-next of 20110526:
when
CONFIG_PROC_FSis not enabled:
drivers/built-in.o: In function `node_read_vmstat':
node.c:(.text+0x56ffa): undefined reference to `vmstat_text'
Right, I believe x86 has the same problem.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 9 lines · Amerigo Wang
On ppc, we got this build error with randconfig:
drivers/built-in.o:(.toc1+0xf90): undefined reference to `vmstat_text': 1 errors in 1 logs
This is due to that it enabled
CONFIG_NUMAbut notCONFIG_SYSFS.And the user-space tool numactl depends on sysfs files too.
So, I think it is very reasonable to makeCONFIG_NUMAdepend onCONFIG_SYSFS.
That looks a bit awful. There is no obvious connection between SYSFS and NUMA. One is exporting information to userspace and the other is the memory model. Without sysfs, NUMA support might be less useful but the memory policies should still work and set_mempolicy() should still be an option.
You didn't post where the buggy reference to vmstat_text but I'm assuming it is in drivers/base/node.c . It would be preferable that it be fixed to not reference vmstat_text unless either CONFIG_PROC_FS or CONFIG_SYSFS is defined similar to what is in mm/vmstat.c .
Signature · 2 lines
Mel Gorman SUSE Labs
ao? 2011a1'07ae??18ae?JPY 21:52, Mel Gorman a??e??:
Quoted 17 lines · Amerigo Wang
Quoted 9 lines
On ppc, we got this build error with randconfig:
drivers/built-in.o:(.toc1+0xf90): undefined reference to `vmstat_text': 1 errors in 1 logs
This is due to that it enabled
CONFIG_NUMAbut notCONFIG_SYSFS.And the user-space tool numactl depends on sysfs files too.
So, I think it is very reasonable to makeCONFIG_NUMAdepend onCONFIG_SYSFS.That looks a bit awful. There is no obvious connection between SYSFS and NUMA. One is exporting information to userspace and the other is the memory model. Without sysfs, NUMA support might be less useful but the memory policies should still work and
set_mempolicy()should still be an option.
Quoted 5 lines
You didn't post where the buggy reference to
vmstat_textbut I'm assuming it is indrivers/base/node.c. It would be preferable that it be fixed to not referencevmstat_textunless eitherCONFIG_PROC_FSorCONFIG_SYSFSis defined similar to what is inmm/vmstat.c.
Hmm, since we don't have to enable SYSFS for NUMA, how about make a new Kconfig for drivers/base/node.c? I.e., CONFIG_NUMA_SYSFS, like patch below.
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.
---
drivers/base/Makefile +1 -1
@@ -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 obj-$(CONFIG_IOMMU_API) += iommu.o
mm/Kconfig +10 -0
@@ -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/, + 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 #
Le mardi 19 juillet 2011 A 14:20 +0800, Cong Wang a A(C)crit :
Quoted 4 lines
Hmm, since we don't have to enable SYSFS for NUMA, how about make a new
Kconfigfordrivers/base/node.c? I.e.,CONFIG_NUMA_SYSFS, like patch below.
I dont quite understand this patch, nor the idea behind it.
You can have a NUMA kernel (for appropriate percpu locality or whatever kernel data), and yet user land processes unable to use numactl if SYSFS is not enabled. I dont see a problem.
Please just fix the link problem ?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
ao? 2011a1'07ae??19ae?JPY 14:54, Eric Dumazet a??e??:
Quoted 7 lines
Le mardi 19 juillet 2011 A 14:20 +0800, Cong Wang a A(C)crit :
Quoted 4 lines
Hmm, since we don't have to enable SYSFS for NUMA, how about make a new
Kconfigfordrivers/base/node.c? I.e.,CONFIG_NUMA_SYSFS, like patch below.
Quoted 6 lines
I dont quite understand this patch, nor the idea behind it.
You can have a NUMA kernel (for appropriate percpu locality or whatever kernel data), and yet user land processes unable to use numactl if SYSFS is not enabled. I dont see a problem.
Both Pekka and Mel pointed out that it makes sense to have NUMA kernel without SYSFS, this means sysfs interface is not a must for NUMA kernel. Thus, I think it makes sense to separate the numa sysfs code out.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 10 lines · Cong Wang
Quoted 9 lines · Eric Dumazet
Quoted 4 lines · Cong Wang
Hmm, since we don't have to enable SYSFS for NUMA, how about make a new
Kconfigfordrivers/base/node.c? I.e.,CONFIG_NUMA_SYSFS, like patch below.I dont quite understand this patch, nor the idea behind it.
Quoted 8 lines
Quoted 4 lines
You can have a NUMA kernel (for appropriate percpu locality or whatever kernel data), and yet user land processes unable to use numactl if SYSFS is not enabled. I dont see a problem.
Both Pekka and Mel pointed out that it makes sense to have NUMA kernel without SYSFS, this means sysfs interface is not a must for NUMA kernel. Thus, I think it makes sense to separate the numa sysfs code out.
Sorry, I misread the patch, I was confused by the title, since it still claims "make CONFIG_NUMA depend on CONFIG_SYSFS" ;)
ao? 2011a1'07ae??19ae?JPY 16:49, Eric Dumazet a??e??:
Quoted 4 lines
Sorry, I misread the patch, I was confused by the title, since it still claims "make
CONFIG_NUMAdepend onCONFIG_SYSFS" ;)
My bad, /me forgot to change $subject. :-/
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>