Hi Johannes, [auto build test ERROR on next-20170616] [cannot apply to linus/master linux/master v4.9-rc8 v4.9-rc7 v4.9-rc6 v4.12-rc5] [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/Johannes-Weiner/mm-memcontrol-per-lruvec-stats-infrastructure-fix-4/20170618-012558 config: x86_64-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.3.0-18) 6.3.0 20170516 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All error/warnings (new ones prefixed by >>): In file included from include/linux/mm.h:1032:0, from include/linux/highmem.h:7, from include/linux/bio.h:21, from include/linux/writeback.h:205, from include/linux/memcontrol.h:28, from include/linux/swap.h:8, from include/linux/suspend.h:4, from arch/x86/kernel/asm-offsets.c:12: include/linux/vmstat.h: In function 'lruvec_page_state': >> include/linux/vmstat.h:362:6: error: implicit declaration of function >> 'mem_cgroup_disabled' [-Werror=implicit-function-declaration] if (mem_cgroup_disabled()) ^~~~~~~~~~~~~~~~~~~ In file included from arch/x86/include/asm/atomic.h:4:0, from include/linux/atomic.h:4, from include/linux/crypto.h:20, from arch/x86/kernel/asm-offsets.c:8: >> include/linux/kernel.h:859:51: error: dereferencing pointer to incomplete >> type 'struct mem_cgroup_per_node' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^ include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert' bool __cond = !(condition); \ ^~~~~~~~~ include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ include/linux/kernel.h:859:2: note: in expansion of macro 'BUILD_BUG_ON_MSG' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~~~~~~ include/linux/kernel.h:859:20: note: in expansion of macro '__same_type' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~ >> include/linux/vmstat.h:365:7: note: in expansion of macro 'container_of' pn = container_of(lruvec, struct mem_cgroup_per_node, lruvec); ^~~~~~~~~~~~ In file included from include/linux/compiler.h:58:0, from arch/x86/include/asm/atomic.h:4, from include/linux/atomic.h:4, from include/linux/crypto.h:20, from arch/x86/kernel/asm-offsets.c:8: >> include/linux/vmstat.h:365:35: error: invalid use of undefined type 'struct >> mem_cgroup_per_node' pn = container_of(lruvec, struct mem_cgroup_per_node, lruvec); ^ include/linux/compiler-gcc.h:161:21: note: in definition of macro '__compiler_offsetof' __builtin_offsetof(a, b) ^ include/linux/kernel.h:862:28: note: in expansion of macro 'offsetof' ((type *)((char *)(ptr) - offsetof(type, member))); }) ^~~~~~~~ >> include/linux/vmstat.h:365:7: note: in expansion of macro 'container_of' pn = container_of(lruvec, struct mem_cgroup_per_node, lruvec); ^~~~~~~~~~~~ In file included from arch/x86/include/asm/atomic.h:4:0, from include/linux/atomic.h:4, from include/linux/crypto.h:20, from arch/x86/kernel/asm-offsets.c:8: include/linux/vmstat.h: In function '__mod_lruvec_state': >> include/linux/kernel.h:859:51: error: dereferencing pointer to incomplete >> type 'struct mem_cgroup_per_node' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^ include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert' bool __cond = !(condition); \ ^~~~~~~~~ include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ include/linux/kernel.h:859:2: note: in expansion of macro 'BUILD_BUG_ON_MSG' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~~~~~~ include/linux/kernel.h:859:20: note: in expansion of macro '__same_type' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~ include/linux/vmstat.h:383:7: note: in expansion of macro 'container_of' pn = container_of(lruvec, struct mem_cgroup_per_node, lruvec); ^~~~~~~~~~~~ In file included from include/linux/compiler.h:58:0, from arch/x86/include/asm/atomic.h:4, from include/linux/atomic.h:4, from include/linux/crypto.h:20, from arch/x86/kernel/asm-offsets.c:8: include/linux/vmstat.h:383:35: error: invalid use of undefined type 'struct mem_cgroup_per_node' pn = container_of(lruvec, struct mem_cgroup_per_node, lruvec); ^ include/linux/compiler-gcc.h:161:21: note: in definition of macro '__compiler_offsetof' __builtin_offsetof(a, b) ^ include/linux/kernel.h:862:28: note: in expansion of macro 'offsetof' ((type *)((char *)(ptr) - offsetof(type, member))); }) ^~~~~~~~ include/linux/vmstat.h:383:7: note: in expansion of macro 'container_of' pn = container_of(lruvec, struct mem_cgroup_per_node, lruvec); ^~~~~~~~~~~~ In file included from include/linux/mm.h:1032:0, from include/linux/highmem.h:7, from include/linux/bio.h:21, from include/linux/writeback.h:205, from include/linux/memcontrol.h:28, from include/linux/swap.h:8, from include/linux/suspend.h:4, from arch/x86/kernel/asm-offsets.c:12: >> include/linux/vmstat.h:384:2: error: implicit declaration of function >> '__mod_memcg_state' [-Werror=implicit-function-declaration] __mod_memcg_state(pn->memcg, idx, val); ^~~~~~~~~~~~~~~~~ In file included from arch/x86/include/asm/atomic.h:4:0, from include/linux/atomic.h:4, from include/linux/crypto.h:20, from arch/x86/kernel/asm-offsets.c:8: include/linux/vmstat.h: In function 'mod_lruvec_state': >> include/linux/kernel.h:859:51: error: dereferencing pointer to incomplete >> type 'struct mem_cgroup_per_node' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^ include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert' bool __cond = !(condition); \ ^~~~~~~~~ include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ include/linux/kernel.h:859:2: note: in expansion of macro 'BUILD_BUG_ON_MSG' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~~~~~~ include/linux/kernel.h:859:20: note: in expansion of macro '__same_type' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~ include/linux/vmstat.h:396:7: note: in expansion of macro 'container_of' pn = container_of(lruvec, struct mem_cgroup_per_node, lruvec); ^~~~~~~~~~~~ In file included from include/linux/compiler.h:58:0, from arch/x86/include/asm/atomic.h:4, from include/linux/atomic.h:4, from include/linux/crypto.h:20, from arch/x86/kernel/asm-offsets.c:8: include/linux/vmstat.h:396:35: error: invalid use of undefined type 'struct mem_cgroup_per_node' pn = container_of(lruvec, struct mem_cgroup_per_node, lruvec); ^ include/linux/compiler-gcc.h:161:21: note: in definition of macro '__compiler_offsetof' __builtin_offsetof(a, b) ^ include/linux/kernel.h:862:28: note: in expansion of macro 'offsetof' ((type *)((char *)(ptr) - offsetof(type, member))); }) ^~~~~~~~ include/linux/vmstat.h:396:7: note: in expansion of macro 'container_of' pn = container_of(lruvec, struct mem_cgroup_per_node, lruvec); ^~~~~~~~~~~~ In file included from include/linux/mm.h:1032:0, from include/linux/highmem.h:7, from include/linux/bio.h:21, from include/linux/writeback.h:205, from include/linux/memcontrol.h:28, from include/linux/swap.h:8, from include/linux/suspend.h:4, from arch/x86/kernel/asm-offsets.c:12: >> include/linux/vmstat.h:397:2: error: implicit declaration of function >> 'mod_memcg_state' [-Werror=implicit-function-declaration] mod_memcg_state(pn->memcg, idx, val); ^~~~~~~~~~~~~~~ include/linux/vmstat.h: In function '__mod_lruvec_page_state': >> include/linux/vmstat.h:410:23: error: dereferencing pointer to incomplete >> type 'struct mem_cgroup' pn = page->mem_cgroup->nodeinfo[page_to_nid(page)]; ^~ 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:80, from include/linux/spinlock.h:50, from include/linux/mmzone.h:7, from include/linux/gfp.h:5, from include/linux/slab.h:14, from include/linux/crypto.h:24, from arch/x86/kernel/asm-offsets.c:8: >> include/linux/vmstat.h:411:19: error: dereferencing pointer to incomplete >> type 'struct mem_cgroup_per_node' __this_cpu_add(pn->lruvec_stat->count[idx], val); ^ include/linux/percpu-defs.h:206:47: note: in definition of macro '__verify_pcpu_ptr' const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \ ^~~ >> include/linux/percpu-defs.h:409:32: note: in expansion of macro >> '__pcpu_size_call' #define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val) ^~~~~~~~~~~~~~~~ >> include/linux/percpu-defs.h:445:2: note: in expansion of macro 'raw_cpu_add' raw_cpu_add(pcp, val); \ ^~~~~~~~~~~ include/linux/vmstat.h:411:2: note: in expansion of macro '__this_cpu_add' __this_cpu_add(pn->lruvec_stat->count[idx], val); ^~~~~~~~~~~~~~ include/linux/vmstat.h: In function 'mod_lruvec_page_state': include/linux/vmstat.h:424:17: error: dereferencing pointer to incomplete type 'struct mem_cgroup_per_node' this_cpu_add(pn->lruvec_stat->count[idx], val); ^ include/linux/percpu-defs.h:206:47: note: in definition of macro '__verify_pcpu_ptr' const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \ ^~~ include/linux/percpu-defs.h:496:33: note: in expansion of macro '__pcpu_size_call' #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val) ^~~~~~~~~~~~~~~~ include/linux/vmstat.h:424:2: note: in expansion of macro 'this_cpu_add' this_cpu_add(pn->lruvec_stat->count[idx], val); ^~~~~~~~~~~~ In file included from include/linux/swap.h:8:0, from include/linux/suspend.h:4, from arch/x86/kernel/asm-offsets.c:12: include/linux/memcontrol.h: At top level: >> include/linux/memcontrol.h:267:20: error: conflicting types for >> 'mem_cgroup_disabled' static inline bool mem_cgroup_disabled(void) ^~~~~~~~~~~~~~~~~~~ In file included from include/linux/mm.h:1032:0, from include/linux/highmem.h:7, from include/linux/bio.h:21, from include/linux/writeback.h:205, from include/linux/memcontrol.h:28, from include/linux/swap.h:8, from include/linux/suspend.h:4, from arch/x86/kernel/asm-offsets.c:12: include/linux/vmstat.h:362:6: note: previous implicit declaration of 'mem_cgroup_disabled' was here if (mem_cgroup_disabled()) ^~~~~~~~~~~~~~~~~~~ In file included from include/linux/swap.h:8:0, from include/linux/suspend.h:4, from arch/x86/kernel/asm-offsets.c:12: >> include/linux/memcontrol.h:502:20: warning: conflicting types for >> '__mod_memcg_state' static inline void __mod_memcg_state(struct mem_cgroup *memcg, ^~~~~~~~~~~~~~~~~ >> include/linux/memcontrol.h:502:20: error: static declaration of >> '__mod_memcg_state' follows non-static declaration In file included from include/linux/mm.h:1032:0, from include/linux/highmem.h:7, from include/linux/bio.h:21, from include/linux/writeback.h:205, from include/linux/memcontrol.h:28, from include/linux/swap.h:8, from include/linux/suspend.h:4, from arch/x86/kernel/asm-offsets.c:12: include/linux/vmstat.h:384:2: note: previous implicit declaration of '__mod_memcg_state' was here __mod_memcg_state(pn->memcg, idx, val); ^~~~~~~~~~~~~~~~~ In file included from include/linux/swap.h:8:0, from include/linux/suspend.h:4, from arch/x86/kernel/asm-offsets.c:12: >> include/linux/memcontrol.h:509:20: warning: conflicting types for >> 'mod_memcg_state' static inline void mod_memcg_state(struct mem_cgroup *memcg, ^~~~~~~~~~~~~~~ >> include/linux/memcontrol.h:509:20: error: static declaration of >> 'mod_memcg_state' follows non-static declaration In file included from include/linux/mm.h:1032:0, from include/linux/highmem.h:7, from include/linux/bio.h:21, from include/linux/writeback.h:205, from include/linux/memcontrol.h:28, from include/linux/swap.h:8, from include/linux/suspend.h:4, from arch/x86/kernel/asm-offsets.c:12: include/linux/vmstat.h:397:2: note: previous implicit declaration of 'mod_memcg_state' was here mod_memcg_state(pn->memcg, idx, val); ^~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[2]: *** [arch/x86/kernel/asm-offsets.s] Error 1 make[2]: Target '__build' not remade because of errors. make[1]: *** [prepare0] Error 2 make[1]: Target 'prepare' not remade because of errors. make: *** [sub-make] Error 2 vim +/mem_cgroup_disabled +362 include/linux/vmstat.h 356 enum node_stat_item idx) 357 { 358 struct mem_cgroup_per_node *pn; 359 long val = 0; 360 int cpu; 361 > 362 if (mem_cgroup_disabled()) 363 return node_page_state(lruvec_pgdat(lruvec), idx); 364 > 365 pn = container_of(lruvec, struct mem_cgroup_per_node, lruvec); 366 for_each_possible_cpu(cpu) 367 val += per_cpu(pn->lruvec_stat->count[idx], cpu); 368 369 if (val < 0) 370 val = 0; 371 372 return val; 373 } 374 375 static inline void __mod_lruvec_state(struct lruvec *lruvec, 376 enum node_stat_item idx, int val) 377 { 378 struct mem_cgroup_per_node *pn; 379 380 __mod_node_page_state(lruvec_pgdat(lruvec), idx, val); 381 if (mem_cgroup_disabled()) 382 return; 383 pn = container_of(lruvec, struct mem_cgroup_per_node, lruvec); > 384 __mod_memcg_state(pn->memcg, idx, val); 385 __this_cpu_add(pn->lruvec_stat->count[idx], val); 386 } 387 388 static inline void mod_lruvec_state(struct lruvec *lruvec, 389 enum node_stat_item idx, int val) 390 { 391 struct mem_cgroup_per_node *pn; 392 393 mod_node_page_state(lruvec_pgdat(lruvec), idx, val); 394 if (mem_cgroup_disabled()) 395 return; 396 pn = container_of(lruvec, struct mem_cgroup_per_node, lruvec); > 397 mod_memcg_state(pn->memcg, idx, val); 398 this_cpu_add(pn->lruvec_stat->count[idx], val); 399 } 400 401 static inline void __mod_lruvec_page_state(struct page *page, 402 enum node_stat_item idx, int val) 403 { 404 struct mem_cgroup_per_node *pn; 405 406 __mod_node_page_state(page_pgdat(page), idx, val); 407 if (mem_cgroup_disabled() || !page->mem_cgroup) 408 return; 409 __mod_memcg_state(page->mem_cgroup, idx, val); > 410 pn = page->mem_cgroup->nodeinfo[page_to_nid(page)]; > 411 __this_cpu_add(pn->lruvec_stat->count[idx], val); 412 } 413 414 static inline void mod_lruvec_page_state(struct page *page, --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: application/gzip