From: Randy Dunlap <rdunlap@xenotime.net> To: David Rientjes <rientjes@google.com> Cc: Andrew Morton <akpm@linux-foundation.org>, Cong Wang <amwang@redhat.com>, Stephen Rothwell <sfr@canb.auug.org.au>, Greg Kroah-Hartman <gregkh@suse.de>, linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>, linux-mm@kvack.org Subject: Re: [patch] numa: fix NUMA compile error when sysfs and procfs are disabled Date: Thu, 25 Aug 2011 10:17:56 -0700 [thread overview] Message-ID: <20110825101756.fbbcc488.rdunlap@xenotime.net> (raw) In-Reply-To: <alpine.DEB.2.00.1108242224180.576@chino.kir.corp.google.com> On Wed, 24 Aug 2011 22:55:02 -0700 (PDT) David Rientjes wrote: > On Thu, 25 Aug 2011, Cong Wang wrote: > > > Ah, this is because I missed the part in include/linux/node.h. :) > > > > Below is the updated version. > > > > I've never had a problem building a kernel with CONFIG_NUMA=y and > CONFIG_SYSFS=n since most of drivers/base/node.c is just an abstraction > that calls into sysfs functions that will be no-ops in such a > configuration. > > The error you cite in a different thread > (http://marc.info/?l=linux-mm&m=131098795024186) about an undefined > reference to vmstat_text is because you have CONFIG_NUMA enabled and both > CONFIG_SYSFS and CONFIG_PROC_FS disabled and we only define vmstat_text > for those fs configurations since that's the only way these strings were > ever emitted before per-node vmstat. > > The correct fix is to define the array for CONFIG_NUMA as well. > > > > numa: fix NUMA compile error when sysfs and procfs are disabled > > The vmstat_text array is only defined for CONFIG_SYSFS or CONFIG_PROC_FS, > yet it is referenced for per-node vmstat with CONFIG_NUMA: > > drivers/built-in.o: In function `node_read_vmstat': > node.c:(.text+0x1106df): undefined reference to `vmstat_text' > > in fa25c503dfa2 (mm: per-node vmstat: show proper vmstats). > > Define the array for CONFIG_NUMA as well. > > Reported-by: Cong Wang <amwang@redhat.com> > Signed-off-by: David Rientjes <rientjes@google.com> Sure, that also works. Acked-by: Randy Dunlap <rdunlap@xenotime.net> > --- > include/linux/vmstat.h | 2 ++ > mm/vmstat.c | 4 ++-- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h > --- a/include/linux/vmstat.h > +++ b/include/linux/vmstat.h > @@ -258,6 +258,8 @@ static inline void refresh_zone_stat_thresholds(void) { } > > #endif /* CONFIG_SMP */ > > +#if defined(CONFIG_PROC_FS) || defined(CONFIG_SYSFS) || defined(CONFIG_NUMA) > extern const char * const vmstat_text[]; > +#endif > > #endif /* _LINUX_VMSTAT_H */ > diff --git a/mm/vmstat.c b/mm/vmstat.c > --- a/mm/vmstat.c > +++ b/mm/vmstat.c > @@ -659,7 +659,7 @@ static void walk_zones_in_node(struct seq_file *m, pg_data_t *pgdat, > } > #endif > > -#if defined(CONFIG_PROC_FS) || defined(CONFIG_SYSFS) > +#if defined(CONFIG_PROC_FS) || defined(CONFIG_SYSFS) || defined(CONFIG_NUMA) > #ifdef CONFIG_ZONE_DMA > #define TEXT_FOR_DMA(xx) xx "_dma", > #else > @@ -788,7 +788,7 @@ const char * const vmstat_text[] = { > > #endif /* CONFIG_VM_EVENTS_COUNTERS */ > }; > -#endif /* CONFIG_PROC_FS || CONFIG_SYSFS */ > +#endif /* CONFIG_PROC_FS || CONFIG_SYSFS || CONFIG_NUMA */ > > > #ifdef CONFIG_PROC_FS --- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code ***
WARNING: multiple messages have this Message-ID (diff)
From: Randy Dunlap <rdunlap@xenotime.net> To: David Rientjes <rientjes@google.com> Cc: Andrew Morton <akpm@linux-foundation.org>, Cong Wang <amwang@redhat.com>, Stephen Rothwell <sfr@canb.auug.org.au>, Greg Kroah-Hartman <gregkh@suse.de>, linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>, linux-mm@kvack.org Subject: Re: [patch] numa: fix NUMA compile error when sysfs and procfs are disabled Date: Thu, 25 Aug 2011 10:17:56 -0700 [thread overview] Message-ID: <20110825101756.fbbcc488.rdunlap@xenotime.net> (raw) In-Reply-To: <alpine.DEB.2.00.1108242224180.576@chino.kir.corp.google.com> On Wed, 24 Aug 2011 22:55:02 -0700 (PDT) David Rientjes wrote: > On Thu, 25 Aug 2011, Cong Wang wrote: > > > Ah, this is because I missed the part in include/linux/node.h. :) > > > > Below is the updated version. > > > > I've never had a problem building a kernel with CONFIG_NUMA=y and > CONFIG_SYSFS=n since most of drivers/base/node.c is just an abstraction > that calls into sysfs functions that will be no-ops in such a > configuration. > > The error you cite in a different thread > (http://marc.info/?l=linux-mm&m=131098795024186) about an undefined > reference to vmstat_text is because you have CONFIG_NUMA enabled and both > CONFIG_SYSFS and CONFIG_PROC_FS disabled and we only define vmstat_text > for those fs configurations since that's the only way these strings were > ever emitted before per-node vmstat. > > The correct fix is to define the array for CONFIG_NUMA as well. > > > > numa: fix NUMA compile error when sysfs and procfs are disabled > > The vmstat_text array is only defined for CONFIG_SYSFS or CONFIG_PROC_FS, > yet it is referenced for per-node vmstat with CONFIG_NUMA: > > drivers/built-in.o: In function `node_read_vmstat': > node.c:(.text+0x1106df): undefined reference to `vmstat_text' > > in fa25c503dfa2 (mm: per-node vmstat: show proper vmstats). > > Define the array for CONFIG_NUMA as well. > > Reported-by: Cong Wang <amwang@redhat.com> > Signed-off-by: David Rientjes <rientjes@google.com> Sure, that also works. Acked-by: Randy Dunlap <rdunlap@xenotime.net> > --- > include/linux/vmstat.h | 2 ++ > mm/vmstat.c | 4 ++-- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h > --- a/include/linux/vmstat.h > +++ b/include/linux/vmstat.h > @@ -258,6 +258,8 @@ static inline void refresh_zone_stat_thresholds(void) { } > > #endif /* CONFIG_SMP */ > > +#if defined(CONFIG_PROC_FS) || defined(CONFIG_SYSFS) || defined(CONFIG_NUMA) > extern const char * const vmstat_text[]; > +#endif > > #endif /* _LINUX_VMSTAT_H */ > diff --git a/mm/vmstat.c b/mm/vmstat.c > --- a/mm/vmstat.c > +++ b/mm/vmstat.c > @@ -659,7 +659,7 @@ static void walk_zones_in_node(struct seq_file *m, pg_data_t *pgdat, > } > #endif > > -#if defined(CONFIG_PROC_FS) || defined(CONFIG_SYSFS) > +#if defined(CONFIG_PROC_FS) || defined(CONFIG_SYSFS) || defined(CONFIG_NUMA) > #ifdef CONFIG_ZONE_DMA > #define TEXT_FOR_DMA(xx) xx "_dma", > #else > @@ -788,7 +788,7 @@ const char * const vmstat_text[] = { > > #endif /* CONFIG_VM_EVENTS_COUNTERS */ > }; > -#endif /* CONFIG_PROC_FS || CONFIG_SYSFS */ > +#endif /* CONFIG_PROC_FS || CONFIG_SYSFS || CONFIG_NUMA */ > > > #ifdef CONFIG_PROC_FS --- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. 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:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-08-25 17:18 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 ` [Patch] numa: introduce CONFIG_NUMA_SYSFS for drivers/base/node.c Cong Wang 2011-08-25 2:14 ` 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 [this message] 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=20110825101756.fbbcc488.rdunlap@xenotime.net \ --to=rdunlap@xenotime.net \ --cc=akpm@linux-foundation.org \ --cc=amwang@redhat.com \ --cc=gregkh@suse.de \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=linux-next@vger.kernel.org \ --cc=rientjes@google.com \ --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: linkBe 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.