[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1605111011260.9351@east.gentwo.org>
Date: Wed, 11 May 2016 10:32:11 -0500 (CDT)
From: Christoph Lameter <cl@...ux.com>
To: Arnd Bergmann <arnd@...db.de>
cc: Andrew Morton <akpm@...ux-foundation.org>,
Hugh Dickins <hughd@...gle.com>,
Vlastimil Babka <vbabka@...e.cz>,
Michal Hocko <mhocko@...e.com>,
Mel Gorman <mgorman@...hsingularity.net>,
Joonsoo Kim <iamjoonsoo.kim@....com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: unhide vmstat_text definition for CONFIG_SMP
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@...ux.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)) {
Powered by blists - more mailing lists