From: Michal Hocko <mhocko@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kbuild test robot <lkp@intel.com>,
kbuild-all@01.org, Mel Gorman <mgorman@suse.de>,
Vlastimil Babka <vbabka@suse.cz>,
Hillf Danton <hillf.zj@alibaba-inc.com>,
linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
Tejun Heo <htejun@gmail.com>
Subject: Re: [PATCH] mm-page_alloc-use-static-global-work_struct-for-draining-per-cpu-pages-fix
Date: Wed, 8 Feb 2017 09:16:52 +0100 [thread overview]
Message-ID: <20170208081652.GB5686@dhcp22.suse.cz> (raw)
In-Reply-To: <20170207141420.ab4de727ed05ddd41602f73f@linux-foundation.org>
On Tue 07-02-17 14:14:20, Andrew Morton wrote:
> On Wed, 8 Feb 2017 05:54:56 +0800 kbuild test robot <lkp@intel.com> wrote:
>
> > Hi Michal,
> >
> > [auto build test ERROR on mmotm/master]
> > [also build test ERROR on v4.10-rc7 next-20170207]
> > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> >
> > url: https://github.com/0day-ci/linux/commits/Michal-Hocko/mm-page_alloc-use-static-global-work_struct-for-draining-per-cpu-pages-fix/20170208-050036
> > base: git://git.cmpxchg.org/linux-mmotm.git master
> > config: i386-randconfig-x001-201706 (attached as .config)
> > compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> > reproduce:
> > # save the attached .config to linux build tree
> > make ARCH=i386
> >
> > All error/warnings (new ones prefixed by >>):
> >
> > In file included from include/asm-generic/percpu.h:6:0,
> > from arch/x86/include/asm/percpu.h:542,
> > from arch/x86/include/asm/preempt.h:5,
> > from include/linux/preempt.h:59,
> > from include/linux/spinlock.h:50,
> > from include/linux/mmzone.h:7,
> > from include/linux/gfp.h:5,
> > from include/linux/mm.h:9,
> > from mm/page_alloc.c:18:
> > mm/page_alloc.c: In function 'drain_all_pages':
> > >> include/linux/percpu-defs.h:91:33: error: section attribute cannot be specified for local variables
> > extern __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \
> > ^
>
> huh, yes. The DEFINE_PER_CPU() macro is broken.
>
> If you do
>
> foo()
> {
> static DEFINE_PER_CPU(int, bar);
> }
>
> then it won't compile, as described here. It should.
>
> And if you do
>
> static DEFINE_PER_CPU(int, bar);
>
> then you still get global symbols (__pcpu_unique_bar).
>
> The kernel does the above thing in, umm, 466 places and afaict they're
> all broken. If two code sites ever use the same identifier, they'll
> get linkage errors.
>
> huh. Seems hard to fix.
Nasty! Unfortunately, I am not familiar with the static pcp code magic
to come up with a fix.
--
Michal Hocko
SUSE Labs
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-02-08 8:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 20:19 [PATCH] mm, page_alloc: do not depend on cpu hotplug locks inside the allocator Michal Hocko
2017-02-07 20:27 ` [PATCH] mm-page_alloc-use-static-global-work_struct-for-draining-per-cpu-pages-fix Michal Hocko
2017-02-07 21:54 ` kbuild test robot
2017-02-07 22:14 ` Andrew Morton
2017-02-08 8:16 ` Michal Hocko [this message]
2017-02-08 18:19 ` Tejun Heo
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=20170208081652.GB5686@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hillf.zj@alibaba-inc.com \
--cc=htejun@gmail.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=mgorman@suse.de \
--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