From: Randy Dunlap <rdunlap@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>,
kbuild test robot <lkp@intel.com>
Cc: Yang Shi <yang.shi@linux.alibaba.com>,
kbuild-all@01.org,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [linux-next:master 12342/12641] mm/vmscan.c:205:7: error: implicit declaration of function 'memcg_expand_shrinker_maps'; did you mean 'memcg_set_shrinker_bit'?
Date: Fri, 5 Jul 2019 19:14:44 -0700 [thread overview]
Message-ID: <517a3638-b7bc-517c-326b-cde81ef9bc9b@infradead.org> (raw)
In-Reply-To: <32e76b4a-d1bd-0e77-85fb-8aaaf7f94017@infradead.org>
On 7/5/19 3:16 PM, Randy Dunlap wrote:
> On 7/5/19 2:20 PM, Andrew Morton wrote:
>> On Fri, 5 Jul 2019 21:09:24 +0800 kbuild test robot <lkp@intel.com> wrote:
>>
>>> tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next.git master
>>> head: 22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12
>>> commit: 8236f517d69e2217f5200d7f700e8b18b01c94c8 [12342/12641] mm: shrinker: make shrinker not depend on memcg kmem
>>> config: x86_64-randconfig-s2-07051907 (attached as .config)
>>> compiler: gcc-7 (Debian 7.4.0-9) 7.4.0
>>> reproduce:
>>> git checkout 8236f517d69e2217f5200d7f700e8b18b01c94c8
>>> # save the attached .config to linux build tree
>>> make ARCH=x86_64
>>>
>>> If you fix the issue, kindly add following tag
>>> Reported-by: kbuild test robot <lkp@intel.com>
>>>
>>> All error/warnings (new ones prefixed by >>):
>>>
>>> mm/vmscan.c: In function 'prealloc_memcg_shrinker':
>>>>> mm/vmscan.c:205:7: error: implicit declaration of function 'memcg_expand_shrinker_maps'; did you mean 'memcg_set_shrinker_bit'? [-Werror=implicit-function-declaration]
>>> if (memcg_expand_shrinker_maps(id)) {
>>> ^~~~~~~~~~~~~~~~~~~~~~~~~~
>>> memcg_set_shrinker_bit
>>> In file included from include/linux/rbtree.h:22:0,
>>> from include/linux/mm_types.h:10,
>>> from include/linux/mmzone.h:21,
>>> from include/linux/gfp.h:6,
>>> from include/linux/mm.h:10,
>>> from mm/vmscan.c:17:
>>> mm/vmscan.c: In function 'shrink_slab_memcg':
>>>>> mm/vmscan.c:593:54: error: 'struct mem_cgroup_per_node' has no member named 'shrinker_map'
>>
>> This?
>>
>> --- a/include/linux/memcontrol.h~mm-shrinker-make-shrinker-not-depend-on-memcg-kmem-fix
>> +++ a/include/linux/memcontrol.h
>> @@ -128,7 +128,7 @@ struct mem_cgroup_per_node {
>>
>> struct mem_cgroup_reclaim_iter iter[DEF_PRIORITY + 1];
>>
>> -#ifdef CONFIG_MEMCG_KMEM
>> +#ifdef CONFIG_MEMCG
>> struct memcg_shrinker_map __rcu *shrinker_map;
>> #endif
>> struct rb_node tree_node; /* RB tree node */
>> @@ -1272,6 +1272,7 @@ static inline bool mem_cgroup_under_sock
>>
>> struct kmem_cache *memcg_kmem_get_cache(struct kmem_cache *cachep);
>> void memcg_kmem_put_cache(struct kmem_cache *cachep);
>> +extern int memcg_expand_shrinker_maps(int new_id);
>>
>> #ifdef CONFIG_MEMCG_KMEM
>> int __memcg_kmem_charge(struct page *page, gfp_t gfp, int order);
>> @@ -1339,8 +1340,6 @@ static inline int memcg_cache_id(struct
>> return memcg ? memcg->kmemcg_id : -1;
>> }
>>
>> -extern int memcg_expand_shrinker_maps(int new_id);
>> -
>> extern void memcg_set_shrinker_bit(struct mem_cgroup *memcg,
>> int nid, int shrinker_id);
>> #else
>> _
>>
>
> Now I see this:
>
> ld: mm/vmscan.o: in function `prealloc_shrinker':
> vmscan.c:(.text+0x3090): undefined reference to `memcg_expand_shrinker_maps'
>
>
> And for the record, I reported this yesterday on mmotm:
> https://lore.kernel.org/lkml/9cbdb785-b51d-9419-6b9a-ec282a4e4fa2@infradead.org/
>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
>
>
> thanks,
I did a similar change as Andrew's, but to mm/memcontrol.c, but that just
causes duplicate function definition errors from <linux/memcontrol.h> because
it has stubs for some functions that are now being built.
--
~Randy
next prev parent reply other threads:[~2019-07-06 2:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-05 13:09 [linux-next:master 12342/12641] mm/vmscan.c:205:7: error: implicit declaration of function 'memcg_expand_shrinker_maps'; did you mean 'memcg_set_shrinker_bit'? kbuild test robot
2019-07-05 21:20 ` Andrew Morton
2019-07-05 22:16 ` Randy Dunlap
2019-07-06 2:14 ` Randy Dunlap [this message]
2019-07-06 2:13 ` 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=517a3638-b7bc-517c-326b-cde81ef9bc9b@infradead.org \
--to=rdunlap@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=kbuild-all@01.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=yang.shi@linux.alibaba.com \
/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).