All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <amwang@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Randy Dunlap <rdunlap@xenotime.net>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	gregkh@suse.de, linux-next@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org
Subject: [Patch] numa: introduce CONFIG_NUMA_SYSFS for drivers/base/node.c
Date: Wed, 24 Aug 2011 11:34:45 +0800	[thread overview]
Message-ID: <4E547155.8090709@redhat.com> (raw)
In-Reply-To: <20110823143912.0691d442.akpm@linux-foundation.org>

[-- Attachment #1: Type: text/plain, Size: 77 bytes --]

Hi, Andrew,

Do you think my patch below is better?

Thanks!

------------->

[-- Attachment #2: numa-depends-on-sysfs.diff --]
[-- Type: text/plain, Size: 1334 bytes --]

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
 #

  reply	other threads:[~2011-08-24  3:35 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-04  4:58 linux-next: Tree for Aug 4 Stephen Rothwell
2011-08-04 21:24 ` linux-next: Tree for Aug 4 (zcache) Randy Dunlap
2011-08-04 21:44   ` Greg KH
2011-08-04 21:51     ` Randy Dunlap
2011-08-04 21:54       ` Thadeu Lima de Souza Cascardo
2011-08-04 21:54         ` Thadeu Lima de Souza Cascardo
2011-08-04 22:00       ` [PATCH] zcache: Use div_u64 for 64-bit division Thadeu Lima de Souza Cascardo
2011-08-04 22:17         ` Randy Dunlap
2011-08-04 22:22 ` [PATCH -next] drivers/base/inode.c: let vmstat_text be optional Randy Dunlap
2011-08-04 22:22   ` Randy Dunlap
2011-08-05  2:38   ` Cong Wang
2011-08-05  2:38     ` Cong Wang
2011-08-05  2:38     ` Cong Wang
2011-08-05  5:43     ` Randy Dunlap
2011-08-05  5:43       ` Randy Dunlap
2011-08-05  8:02       ` Cong Wang
2011-08-05  8:02         ` Cong Wang
2011-08-05  8:02         ` Cong Wang
2011-08-23 21:39   ` Andrew Morton
2011-08-23 21:39     ` Andrew Morton
2011-08-24  3:34     ` Cong Wang [this message]
2011-08-25  2:14       ` [Patch] numa: introduce CONFIG_NUMA_SYSFS for drivers/base/node.c Randy Dunlap
2011-08-25  2:14         ` Randy Dunlap
2011-08-25  3:31         ` Cong Wang
2011-08-25  3:31           ` Cong Wang
2011-08-25  3:50           ` Randy Dunlap
2011-08-25  3:50             ` Randy Dunlap
2011-08-25  5:04             ` David Rientjes
2011-08-25  5:04               ` David Rientjes
2011-08-25 10:22               ` Cong Wang
2011-08-25 10:22                 ` Cong Wang
2011-08-25 10:22                 ` Cong Wang
2011-08-25 20:57                 ` David Rientjes
2011-08-25 20:57                   ` David Rientjes
2011-08-29  2:29                   ` Cong Wang
2011-08-29  2:29                     ` Cong Wang
2011-08-29  2:29                     ` Cong Wang
2011-08-25  5:55           ` [patch] numa: fix NUMA compile error when sysfs and procfs are disabled David Rientjes
2011-08-25  5:55             ` David Rientjes
2011-08-25 17:17             ` Randy Dunlap
2011-08-25 17:17               ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E547155.8090709@redhat.com \
    --to=amwang@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-next@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.