Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1399213 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2016-05-11 17:00 +0200 |
| Last post | 2016-05-11 17:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] mm: unhide vmstat_text definition for CONFIG_SMP Arnd Bergmann <arnd@arndb.de> - 2016-05-11 17:00 +0200
Re: [PATCH] mm: unhide vmstat_text definition for CONFIG_SMP Christoph Lameter <cl@linux.com> - 2016-05-11 17:40 +0200
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-05-11 17:00 +0200 |
| Subject | [PATCH] mm: unhide vmstat_text definition for CONFIG_SMP |
| Message-ID | <rxDMf-1Nm-33@gated-at.bofh.it> |
In randconfig builds with sysfs, procfs and numa all disabled,
but SMP enabled, we now get a link error in the newly introduced
vmstat_refresh function:
mm/built-in.o: In function `vmstat_refresh':
:(.text+0x15c78): undefined reference to `vmstat_text'
This modifes the already elaborate #ifdef to also cover that
configuration.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: mmotm ("mm: /proc/sys/vm/stat_refresh to force vmstat update")
---
mm/vmstat.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 57a24e919907..5367eb9b858b 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -678,7 +678,8 @@ int fragmentation_index(struct zone *zone, unsigned int order)
}
#endif
-#if defined(CONFIG_PROC_FS) || defined(CONFIG_SYSFS) || defined(CONFIG_NUMA)
+#if defined(CONFIG_PROC_FS) || defined(CONFIG_SYSFS) || \
+ defined(CONFIG_NUMA) || defined(CONFIG_SMP)
#ifdef CONFIG_ZONE_DMA
#define TEXT_FOR_DMA(xx) xx "_dma",
#else
@@ -857,7 +858,7 @@ const char * const vmstat_text[] = {
#endif
#endif /* CONFIG_VM_EVENTS_COUNTERS */
};
-#endif /* CONFIG_PROC_FS || CONFIG_SYSFS || CONFIG_NUMA */
+#endif /* CONFIG_PROC_FS || CONFIG_SYSFS || CONFIG_NUMA || CONFIG_SMP */
#if (defined(CONFIG_DEBUG_FS) && defined(CONFIG_COMPACTION)) || \
--
2.7.0
[toc] | [next] | [standalone]
| From | Christoph Lameter <cl@linux.com> |
|---|---|
| Date | 2016-05-11 17:40 +0200 |
| Message-ID | <rxEoX-2BM-43@gated-at.bofh.it> |
| In reply to | #1399213 |
On Wed, 11 May 2016, Arnd Bergmann wrote:
> In randconfig builds with sysfs, procfs and numa all disabled,
> but SMP enabled, we now get a link error in the newly introduced
> vmstat_refresh function:
>
> mm/built-in.o: In function `vmstat_refresh':
Hmmm... vmstat_refresh should not be build if CONFIG_PROC_FS is not set
since there will be no way to trigger it. Lets not complicate this
further.
Subject: Do not build vmstat_refresh if there is no procfs support
It makes no sense to build functionality into the kernel that
cannot be used and causes build issues.
Signed-off-by: Christoph Lameter <cl@linux.com>
Index: linux/mm/vmstat.c
===================================================================
--- linux.orig/mm/vmstat.c
+++ linux/mm/vmstat.c
@@ -1358,7 +1358,6 @@ static const struct file_operations proc
.llseek = seq_lseek,
.release = seq_release,
};
-#endif /* CONFIG_PROC_FS */
#ifdef CONFIG_SMP
static struct workqueue_struct *vmstat_wq;
@@ -1422,7 +1421,10 @@ int vmstat_refresh(struct ctl_table *tab
*lenp = 0;
return 0;
}
+#endif /* CONFIG_SMP */
+#endif /* CONFIG_PROC_FS */
+#ifdef CONFIG_SMP
static void vmstat_update(struct work_struct *w)
{
if (refresh_cpu_vm_stats(true)) {
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web