From: Andrew Morton <akpm@linux-foundation.org>
To: Michal Hocko <mhocko@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Hugh Dickins <hughd@google.com>,
Vlastimil Babka <vbabka@suse.cz>,
Christoph Lameter <cl@linux.com>,
Mel Gorman <mgorman@techsingularity.net>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: unhide vmstat_text definition for CONFIG_SMP
Date: Mon, 16 May 2016 15:36:56 -0700 [thread overview]
Message-ID: <20160516153656.2cf37a2f4af4b30cee6a7c86@linux-foundation.org> (raw)
In-Reply-To: <20160516142332.GL23146@dhcp22.suse.cz>
On Mon, 16 May 2016 16:23:33 +0200 Michal Hocko <mhocko@kernel.org> wrote:
> Andrew, I think that the following is more straightforward fix and
> should be folded in to the patch which has introduced vmstat_refresh.
> ---
> >From b8dd18fb7df040e1bfe61aadde1d903589de15e4 Mon Sep 17 00:00:00 2001
> From: Michal Hocko <mhocko@suse.com>
> Date: Mon, 16 May 2016 16:19:53 +0200
> Subject: [PATCH] mmotm: mm-proc-sys-vm-stat_refresh-to-force-vmstat-update-fix
>
> Arnd has reported:
> 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'
>
> vmstat_refresh is proc_fs specific so there is no reason to define it
> when !CONFIG_PROC_FS.
I already had this:
From: Christoph Lameter <cl@linux.com>
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.
Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1605111011260.9351@east.gentwo.org
Signed-off-by: Christoph Lameter <cl@linux.com>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/vmstat.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff -puN mm/vmstat.c~mm-proc-sys-vm-stat_refresh-to-force-vmstat-update-fix mm/vmstat.c
--- a/mm/vmstat.c~mm-proc-sys-vm-stat_refresh-to-force-vmstat-update-fix
+++ a/mm/vmstat.c
@@ -1371,7 +1371,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;
@@ -1436,7 +1435,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)) {
_
next prev parent reply other threads:[~2016-05-16 22:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 14:54 [PATCH] mm: unhide vmstat_text definition for CONFIG_SMP Arnd Bergmann
2016-05-11 15:32 ` Christoph Lameter
2016-05-16 7:31 ` Michal Hocko
2016-05-17 5:31 ` Do not build vmstat_refresh if there is no procfs support kbuild test robot
2016-05-16 7:37 ` [PATCH] mm: unhide vmstat_text definition for CONFIG_SMP Michal Hocko
2016-05-16 13:54 ` Christoph Lameter
2016-05-16 14:23 ` Michal Hocko
2016-05-16 22:36 ` Andrew Morton [this message]
2016-05-17 7:05 ` Michal Hocko
2016-05-18 1:02 ` Hugh Dickins
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=20160516153656.2cf37a2f4af4b30cee6a7c86@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=cl@linux.com \
--cc=hughd@google.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@kernel.org \
--cc=vbabka@suse.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).