Re: [PATCH v3 06/18] mm/memcg: Add folio_memcg() and related functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi "Matthew,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on next-20210629]
[cannot apply to hnaz-linux-mm/master tip/perf/core cgroup/for-next v5.13]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Matthew-Wilcox-Oracle/Folio-conversion-of-memcg/20210630-121408
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 007b350a58754a93ca9fe50c498cc27780171153
config: x86_64-randconfig-a003-20210628 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8d21d5472501460933e78aead04cf59579025ba4)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/615adf6169006fa1bc5e19d2105ff9a333bef423
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Matthew-Wilcox-Oracle/Folio-conversion-of-memcg/20210630-121408
        git checkout 615adf6169006fa1bc5e19d2105ff9a333bef423
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=x86_64 olddefconfig

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:28:
   In file included from include/linux/cgroup-defs.h:22:
   In file included from include/linux/bpf-cgroup.h:5:
   In file included from include/linux/bpf.h:20:
   In file included from include/linux/kallsyms.h:12:
   include/linux/mm.h:1382:42: warning: declaration of 'struct folio' will not be visible outside of this function [-Wvisibility]
   static inline int folio_nid(const struct folio *folio)
                                            ^
   include/linux/mm.h:1384:27: error: incomplete definition of type 'struct folio'
           return page_to_nid(&folio->page);
                               ~~~~~^
   include/linux/mm.h:1382:42: note: forward declaration of 'struct folio'
   static inline int folio_nid(const struct folio *folio)
                                            ^
   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   include/linux/memcontrol.h:375:44: warning: declaration of 'struct folio' will not be visible outside of this function [-Wvisibility]
   static inline bool folio_memcg_kmem(struct folio *folio);
                                              ^
   include/linux/memcontrol.h:399:55: warning: declaration of 'struct folio' will not be visible outside of this function [-Wvisibility]
   static inline struct mem_cgroup *__folio_memcg(struct folio *folio)
                                                         ^
>> include/linux/memcontrol.h:401:34: error: incomplete definition of type 'struct folio'
           unsigned long memcg_data = folio->memcg_data;
                                      ~~~~~^
   include/linux/memcontrol.h:399:55: note: forward declaration of 'struct folio'
   static inline struct mem_cgroup *__folio_memcg(struct folio *folio)
                                                         ^
>> include/linux/memcontrol.h:403:2: error: implicit declaration of function 'VM_BUG_ON_FOLIO' [-Werror,-Wimplicit-function-declaration]
           VM_BUG_ON_FOLIO(folio_slab(folio), folio);
           ^
>> include/linux/memcontrol.h:403:18: error: implicit declaration of function 'folio_slab' [-Werror,-Wimplicit-function-declaration]
           VM_BUG_ON_FOLIO(folio_slab(folio), folio);
                           ^
   include/linux/memcontrol.h:420:55: warning: declaration of 'struct folio' will not be visible outside of this function [-Wvisibility]
   static inline struct obj_cgroup *__folio_objcg(struct folio *folio)
                                                         ^
   include/linux/memcontrol.h:422:34: error: incomplete definition of type 'struct folio'
           unsigned long memcg_data = folio->memcg_data;
                                      ~~~~~^
   include/linux/memcontrol.h:420:55: note: forward declaration of 'struct folio'
   static inline struct obj_cgroup *__folio_objcg(struct folio *folio)
                                                         ^
   include/linux/memcontrol.h:424:2: error: implicit declaration of function 'VM_BUG_ON_FOLIO' [-Werror,-Wimplicit-function-declaration]
           VM_BUG_ON_FOLIO(folio_slab(folio), folio);
           ^
   include/linux/memcontrol.h:424:18: error: implicit declaration of function 'folio_slab' [-Werror,-Wimplicit-function-declaration]
           VM_BUG_ON_FOLIO(folio_slab(folio), folio);
                           ^
   include/linux/memcontrol.h:451:53: warning: declaration of 'struct folio' will not be visible outside of this function [-Wvisibility]
   static inline struct mem_cgroup *folio_memcg(struct folio *folio)
                                                       ^
   include/linux/memcontrol.h:453:23: error: incompatible pointer types passing 'struct folio *' to parameter of type 'struct folio *' [-Werror,-Wincompatible-pointer-types]
           if (folio_memcg_kmem(folio))
                                ^~~~~
   include/linux/memcontrol.h:375:51: note: passing argument to parameter 'folio' here
   static inline bool folio_memcg_kmem(struct folio *folio);
                                                     ^
   include/linux/memcontrol.h:454:41: error: incompatible pointer types passing 'struct folio *' to parameter of type 'struct folio *' [-Werror,-Wincompatible-pointer-types]
                   return obj_cgroup_memcg(__folio_objcg(folio));
                                                         ^~~~~
   include/linux/memcontrol.h:420:62: note: passing argument to parameter 'folio' here
   static inline struct obj_cgroup *__folio_objcg(struct folio *folio)
                                                                ^
   include/linux/memcontrol.h:456:24: error: incompatible pointer types passing 'struct folio *' to parameter of type 'struct folio *' [-Werror,-Wincompatible-pointer-types]
                   return __folio_memcg(folio);
                                        ^~~~~
   include/linux/memcontrol.h:399:62: note: passing argument to parameter 'folio' here
   static inline struct mem_cgroup *__folio_memcg(struct folio *folio)
                                                                ^
   include/linux/memcontrol.h:461:21: error: implicit declaration of function 'page_folio' [-Werror,-Wimplicit-function-declaration]
           return folio_memcg(page_folio(page));
                              ^
   include/linux/memcontrol.h:461:21: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct folio *' [-Wint-conversion]
           return folio_memcg(page_folio(page));
                              ^~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:451:60: note: passing argument to parameter 'folio' here
   static inline struct mem_cgroup *folio_memcg(struct folio *folio)
                                                              ^
   include/linux/memcontrol.h:541:44: warning: declaration of 'struct folio' will not be visible outside of this function [-Wvisibility]
   static inline bool folio_memcg_kmem(struct folio *folio)
                                              ^
   include/linux/memcontrol.h:541:20: error: conflicting types for 'folio_memcg_kmem'
   static inline bool folio_memcg_kmem(struct folio *folio)
                      ^
   include/linux/memcontrol.h:375:20: note: previous declaration is here
   static inline bool folio_memcg_kmem(struct folio *folio);
                      ^
   include/linux/memcontrol.h:543:35: error: incomplete definition of type 'struct folio'
           VM_BUG_ON_PGFLAGS(PageTail(&folio->page), &folio->page);
                                       ~~~~~^
   include/linux/mmdebug.h:76:60: note: expanded from macro 'VM_BUG_ON_PGFLAGS'
   #define VM_BUG_ON_PGFLAGS(cond, page) BUILD_BUG_ON_INVALID(cond)
                                                              ^~~~
   include/linux/build_bug.h:30:63: note: expanded from macro 'BUILD_BUG_ON_INVALID'
   #define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
                                                                 ^
   include/linux/memcontrol.h:541:44: note: forward declaration of 'struct folio'
   static inline bool folio_memcg_kmem(struct folio *folio)
                                              ^
   include/linux/memcontrol.h:544:2: error: implicit declaration of function 'VM_BUG_ON_FOLIO' [-Werror,-Wimplicit-function-declaration]
           VM_BUG_ON_FOLIO(folio->memcg_data & MEMCG_DATA_OBJCGS, folio);
           ^
   include/linux/memcontrol.h:544:23: error: incomplete definition of type 'struct folio'
           VM_BUG_ON_FOLIO(folio->memcg_data & MEMCG_DATA_OBJCGS, folio);
                           ~~~~~^
   include/linux/memcontrol.h:541:44: note: forward declaration of 'struct folio'
   static inline bool folio_memcg_kmem(struct folio *folio)
                                              ^
   include/linux/memcontrol.h:545:14: error: incomplete definition of type 'struct folio'
           return folio->memcg_data & MEMCG_DATA_KMEM;
                  ~~~~~^
   include/linux/memcontrol.h:541:44: note: forward declaration of 'struct folio'
   static inline bool folio_memcg_kmem(struct folio *folio)
                                              ^
   include/linux/memcontrol.h:607:26: error: implicit declaration of function 'page_folio' [-Werror,-Wimplicit-function-declaration]
           return folio_memcg_kmem(page_folio(page));
                                   ^
   include/linux/memcontrol.h:607:26: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct folio *' [-Wint-conversion]
           return folio_memcg_kmem(page_folio(page));
                                   ^~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:375:51: note: passing argument to parameter 'folio' here
   static inline bool folio_memcg_kmem(struct folio *folio);
                                                     ^
   8 warnings and 17 errors generated.
--
   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:28:
   In file included from include/linux/cgroup-defs.h:22:
   In file included from include/linux/bpf-cgroup.h:5:
   In file included from include/linux/bpf.h:20:
   In file included from include/linux/kallsyms.h:12:
   include/linux/mm.h:1382:42: warning: declaration of 'struct folio' will not be visible outside of this function [-Wvisibility]
   static inline int folio_nid(const struct folio *folio)
                                            ^
   include/linux/mm.h:1384:27: error: incomplete definition of type 'struct folio'
           return page_to_nid(&folio->page);
                               ~~~~~^
   include/linux/mm.h:1382:42: note: forward declaration of 'struct folio'
   static inline int folio_nid(const struct folio *folio)
                                            ^
   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   include/linux/memcontrol.h:375:44: warning: declaration of 'struct folio' will not be visible outside of this function [-Wvisibility]
   static inline bool folio_memcg_kmem(struct folio *folio);
                                              ^
   include/linux/memcontrol.h:399:55: warning: declaration of 'struct folio' will not be visible outside of this function [-Wvisibility]
   static inline struct mem_cgroup *__folio_memcg(struct folio *folio)
                                                         ^
>> include/linux/memcontrol.h:401:34: error: incomplete definition of type 'struct folio'
           unsigned long memcg_data = folio->memcg_data;
                                      ~~~~~^
   include/linux/memcontrol.h:399:55: note: forward declaration of 'struct folio'
   static inline struct mem_cgroup *__folio_memcg(struct folio *folio)
                                                         ^
>> include/linux/memcontrol.h:403:2: error: implicit declaration of function 'VM_BUG_ON_FOLIO' [-Werror,-Wimplicit-function-declaration]
           VM_BUG_ON_FOLIO(folio_slab(folio), folio);
           ^
>> include/linux/memcontrol.h:403:18: error: implicit declaration of function 'folio_slab' [-Werror,-Wimplicit-function-declaration]
           VM_BUG_ON_FOLIO(folio_slab(folio), folio);
                           ^
   include/linux/memcontrol.h:420:55: warning: declaration of 'struct folio' will not be visible outside of this function [-Wvisibility]
   static inline struct obj_cgroup *__folio_objcg(struct folio *folio)
                                                         ^
   include/linux/memcontrol.h:422:34: error: incomplete definition of type 'struct folio'
           unsigned long memcg_data = folio->memcg_data;
                                      ~~~~~^
   include/linux/memcontrol.h:420:55: note: forward declaration of 'struct folio'
   static inline struct obj_cgroup *__folio_objcg(struct folio *folio)
                                                         ^
   include/linux/memcontrol.h:424:2: error: implicit declaration of function 'VM_BUG_ON_FOLIO' [-Werror,-Wimplicit-function-declaration]
           VM_BUG_ON_FOLIO(folio_slab(folio), folio);
           ^
   include/linux/memcontrol.h:424:18: error: implicit declaration of function 'folio_slab' [-Werror,-Wimplicit-function-declaration]
           VM_BUG_ON_FOLIO(folio_slab(folio), folio);
                           ^
   include/linux/memcontrol.h:451:53: warning: declaration of 'struct folio' will not be visible outside of this function [-Wvisibility]
   static inline struct mem_cgroup *folio_memcg(struct folio *folio)
                                                       ^
   include/linux/memcontrol.h:453:23: error: incompatible pointer types passing 'struct folio *' to parameter of type 'struct folio *' [-Werror,-Wincompatible-pointer-types]
           if (folio_memcg_kmem(folio))
                                ^~~~~
   include/linux/memcontrol.h:375:51: note: passing argument to parameter 'folio' here
   static inline bool folio_memcg_kmem(struct folio *folio);
                                                     ^
   include/linux/memcontrol.h:454:41: error: incompatible pointer types passing 'struct folio *' to parameter of type 'struct folio *' [-Werror,-Wincompatible-pointer-types]
                   return obj_cgroup_memcg(__folio_objcg(folio));
                                                         ^~~~~
   include/linux/memcontrol.h:420:62: note: passing argument to parameter 'folio' here
   static inline struct obj_cgroup *__folio_objcg(struct folio *folio)
                                                                ^
   include/linux/memcontrol.h:456:24: error: incompatible pointer types passing 'struct folio *' to parameter of type 'struct folio *' [-Werror,-Wincompatible-pointer-types]
                   return __folio_memcg(folio);
                                        ^~~~~
   include/linux/memcontrol.h:399:62: note: passing argument to parameter 'folio' here
   static inline struct mem_cgroup *__folio_memcg(struct folio *folio)
                                                                ^
   include/linux/memcontrol.h:461:21: error: implicit declaration of function 'page_folio' [-Werror,-Wimplicit-function-declaration]
           return folio_memcg(page_folio(page));
                              ^
   include/linux/memcontrol.h:461:21: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct folio *' [-Wint-conversion]
           return folio_memcg(page_folio(page));
                              ^~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:451:60: note: passing argument to parameter 'folio' here
   static inline struct mem_cgroup *folio_memcg(struct folio *folio)
                                                              ^
   include/linux/memcontrol.h:541:44: warning: declaration of 'struct folio' will not be visible outside of this function [-Wvisibility]
   static inline bool folio_memcg_kmem(struct folio *folio)
                                              ^
   include/linux/memcontrol.h:541:20: error: conflicting types for 'folio_memcg_kmem'
   static inline bool folio_memcg_kmem(struct folio *folio)
                      ^
   include/linux/memcontrol.h:375:20: note: previous declaration is here
   static inline bool folio_memcg_kmem(struct folio *folio);
                      ^
   include/linux/memcontrol.h:543:35: error: incomplete definition of type 'struct folio'
           VM_BUG_ON_PGFLAGS(PageTail(&folio->page), &folio->page);
                                       ~~~~~^
   include/linux/mmdebug.h:76:60: note: expanded from macro 'VM_BUG_ON_PGFLAGS'
   #define VM_BUG_ON_PGFLAGS(cond, page) BUILD_BUG_ON_INVALID(cond)
                                                              ^~~~
   include/linux/build_bug.h:30:63: note: expanded from macro 'BUILD_BUG_ON_INVALID'
   #define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
                                                                 ^
   include/linux/memcontrol.h:541:44: note: forward declaration of 'struct folio'
   static inline bool folio_memcg_kmem(struct folio *folio)
                                              ^
   include/linux/memcontrol.h:544:2: error: implicit declaration of function 'VM_BUG_ON_FOLIO' [-Werror,-Wimplicit-function-declaration]
           VM_BUG_ON_FOLIO(folio->memcg_data & MEMCG_DATA_OBJCGS, folio);
           ^
   include/linux/memcontrol.h:544:23: error: incomplete definition of type 'struct folio'
           VM_BUG_ON_FOLIO(folio->memcg_data & MEMCG_DATA_OBJCGS, folio);
                           ~~~~~^
   include/linux/memcontrol.h:541:44: note: forward declaration of 'struct folio'
   static inline bool folio_memcg_kmem(struct folio *folio)
                                              ^
   include/linux/memcontrol.h:545:14: error: incomplete definition of type 'struct folio'
           return folio->memcg_data & MEMCG_DATA_KMEM;
                  ~~~~~^
   include/linux/memcontrol.h:541:44: note: forward declaration of 'struct folio'
   static inline bool folio_memcg_kmem(struct folio *folio)
                                              ^
   include/linux/memcontrol.h:607:26: error: implicit declaration of function 'page_folio' [-Werror,-Wimplicit-function-declaration]
           return folio_memcg_kmem(page_folio(page));
                                   ^
   include/linux/memcontrol.h:607:26: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct folio *' [-Wint-conversion]
           return folio_memcg_kmem(page_folio(page));
                                   ^~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:375:51: note: passing argument to parameter 'folio' here
   static inline bool folio_memcg_kmem(struct folio *folio);
                                                     ^
   8 warnings and 17 errors generated.
   make[2]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1235: prepare0] Error 2
   make[1]: Target 'modules_prepare' not remade because of errors.
   make: *** [Makefile:215: __sub-make] Error 2
   make: Target 'modules_prepare' not remade because of errors.
--
   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:28:
   In file included from include/linux/cgroup-defs.h:22:
   In file included from include/linux/bpf-cgroup.h:5:
   In file included from include/linux/bpf.h:20:
   In file included from include/linux/kallsyms.h:12:
   include/linux/mm.h:1382:42: warning: declaration of 'struct folio' will not be visible outside of this function [-Wvisibility]
   static inline int folio_nid(const struct folio *folio)
                                            ^
   include/linux/mm.h:1384:27: error: incomplete definition of type 'struct folio'
           return page_to_nid(&folio->page);
                               ~~~~~^
   include/linux/mm.h:1382:42: note: forward declaration of 'struct folio'
   static inline int folio_nid(const struct folio *folio)
                                            ^
   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   include/linux/memcontrol.h:375:44: warning: declaration of 'struct folio' will not be visible outside of this function [-Wvisibility]
   static inline bool folio_memcg_kmem(struct folio *folio);
                                              ^
   include/linux/memcontrol.h:399:55: warning: declaration of 'struct folio' will not be visible outside of this function [-Wvisibility]
   static inline struct mem_cgroup *__folio_memcg(struct folio *folio)
                                                         ^
>> include/linux/memcontrol.h:401:34: error: incomplete definition of type 'struct folio'
           unsigned long memcg_data = folio->memcg_data;
                                      ~~~~~^
   include/linux/memcontrol.h:399:55: note: forward declaration of 'struct folio'
   static inline struct mem_cgroup *__folio_memcg(struct folio *folio)
                                                         ^
>> include/linux/memcontrol.h:403:2: error: implicit declaration of function 'VM_BUG_ON_FOLIO' [-Werror,-Wimplicit-function-declaration]
           VM_BUG_ON_FOLIO(folio_slab(folio), folio);
           ^
>> include/linux/memcontrol.h:403:18: error: implicit declaration of function 'folio_slab' [-Werror,-Wimplicit-function-declaration]
           VM_BUG_ON_FOLIO(folio_slab(folio), folio);
                           ^
   include/linux/memcontrol.h:420:55: warning: declaration of 'struct folio' will not be visible outside of this function [-Wvisibility]
   static inline struct obj_cgroup *__folio_objcg(struct folio *folio)
                                                         ^
   include/linux/memcontrol.h:422:34: error: incomplete definition of type 'struct folio'
           unsigned long memcg_data = folio->memcg_data;
                                      ~~~~~^
   include/linux/memcontrol.h:420:55: note: forward declaration of 'struct folio'
   static inline struct obj_cgroup *__folio_objcg(struct folio *folio)
                                                         ^
   include/linux/memcontrol.h:424:2: error: implicit declaration of function 'VM_BUG_ON_FOLIO' [-Werror,-Wimplicit-function-declaration]
           VM_BUG_ON_FOLIO(folio_slab(folio), folio);
           ^
   include/linux/memcontrol.h:424:18: error: implicit declaration of function 'folio_slab' [-Werror,-Wimplicit-function-declaration]
           VM_BUG_ON_FOLIO(folio_slab(folio), folio);
                           ^
   include/linux/memcontrol.h:451:53: warning: declaration of 'struct folio' will not be visible outside of this function [-Wvisibility]
   static inline struct mem_cgroup *folio_memcg(struct folio *folio)
                                                       ^
   include/linux/memcontrol.h:453:23: error: incompatible pointer types passing 'struct folio *' to parameter of type 'struct folio *' [-Werror,-Wincompatible-pointer-types]
           if (folio_memcg_kmem(folio))
                                ^~~~~
   include/linux/memcontrol.h:375:51: note: passing argument to parameter 'folio' here
   static inline bool folio_memcg_kmem(struct folio *folio);
                                                     ^
   include/linux/memcontrol.h:454:41: error: incompatible pointer types passing 'struct folio *' to parameter of type 'struct folio *' [-Werror,-Wincompatible-pointer-types]
                   return obj_cgroup_memcg(__folio_objcg(folio));
                                                         ^~~~~
   include/linux/memcontrol.h:420:62: note: passing argument to parameter 'folio' here
   static inline struct obj_cgroup *__folio_objcg(struct folio *folio)
                                                                ^
   include/linux/memcontrol.h:456:24: error: incompatible pointer types passing 'struct folio *' to parameter of type 'struct folio *' [-Werror,-Wincompatible-pointer-types]
                   return __folio_memcg(folio);
                                        ^~~~~
   include/linux/memcontrol.h:399:62: note: passing argument to parameter 'folio' here
   static inline struct mem_cgroup *__folio_memcg(struct folio *folio)
                                                                ^
   include/linux/memcontrol.h:461:21: error: implicit declaration of function 'page_folio' [-Werror,-Wimplicit-function-declaration]
           return folio_memcg(page_folio(page));
                              ^
   include/linux/memcontrol.h:461:21: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct folio *' [-Wint-conversion]
           return folio_memcg(page_folio(page));
                              ^~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:451:60: note: passing argument to parameter 'folio' here
   static inline struct mem_cgroup *folio_memcg(struct folio *folio)
                                                              ^
   include/linux/memcontrol.h:541:44: warning: declaration of 'struct folio' will not be visible outside of this function [-Wvisibility]
   static inline bool folio_memcg_kmem(struct folio *folio)
                                              ^
   include/linux/memcontrol.h:541:20: error: conflicting types for 'folio_memcg_kmem'
   static inline bool folio_memcg_kmem(struct folio *folio)
                      ^
   include/linux/memcontrol.h:375:20: note: previous declaration is here
   static inline bool folio_memcg_kmem(struct folio *folio);
                      ^
   include/linux/memcontrol.h:543:35: error: incomplete definition of type 'struct folio'
           VM_BUG_ON_PGFLAGS(PageTail(&folio->page), &folio->page);
                                       ~~~~~^
   include/linux/mmdebug.h:76:60: note: expanded from macro 'VM_BUG_ON_PGFLAGS'
   #define VM_BUG_ON_PGFLAGS(cond, page) BUILD_BUG_ON_INVALID(cond)
                                                              ^~~~
   include/linux/build_bug.h:30:63: note: expanded from macro 'BUILD_BUG_ON_INVALID'
   #define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
                                                                 ^
   include/linux/memcontrol.h:541:44: note: forward declaration of 'struct folio'
   static inline bool folio_memcg_kmem(struct folio *folio)
                                              ^
   include/linux/memcontrol.h:544:2: error: implicit declaration of function 'VM_BUG_ON_FOLIO' [-Werror,-Wimplicit-function-declaration]
           VM_BUG_ON_FOLIO(folio->memcg_data & MEMCG_DATA_OBJCGS, folio);
           ^
   include/linux/memcontrol.h:544:23: error: incomplete definition of type 'struct folio'
           VM_BUG_ON_FOLIO(folio->memcg_data & MEMCG_DATA_OBJCGS, folio);
                           ~~~~~^
   include/linux/memcontrol.h:541:44: note: forward declaration of 'struct folio'
   static inline bool folio_memcg_kmem(struct folio *folio)
                                              ^
   include/linux/memcontrol.h:545:14: error: incomplete definition of type 'struct folio'
           return folio->memcg_data & MEMCG_DATA_KMEM;
                  ~~~~~^
   include/linux/memcontrol.h:541:44: note: forward declaration of 'struct folio'
   static inline bool folio_memcg_kmem(struct folio *folio)
                                              ^
   include/linux/memcontrol.h:607:26: error: implicit declaration of function 'page_folio' [-Werror,-Wimplicit-function-declaration]
           return folio_memcg_kmem(page_folio(page));
                                   ^
   include/linux/memcontrol.h:607:26: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct folio *' [-Wint-conversion]
           return folio_memcg_kmem(page_folio(page));
                                   ^~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:375:51: note: passing argument to parameter 'folio' here
   static inline bool folio_memcg_kmem(struct folio *folio);
                                                     ^
   8 warnings and 17 errors generated.
   make[2]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1235: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:215: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +401 include/linux/memcontrol.h

   373	
   374	static inline bool PageMemcgKmem(struct page *page);
 > 375	static inline bool folio_memcg_kmem(struct folio *folio);
   376	
   377	/*
   378	 * After the initialization objcg->memcg is always pointing at
   379	 * a valid memcg, but can be atomically swapped to the parent memcg.
   380	 *
   381	 * The caller must ensure that the returned memcg won't be released:
   382	 * e.g. acquire the rcu_read_lock or css_set_lock.
   383	 */
   384	static inline struct mem_cgroup *obj_cgroup_memcg(struct obj_cgroup *objcg)
   385	{
   386		return READ_ONCE(objcg->memcg);
   387	}
   388	
   389	/*
   390	 * __folio_memcg - Get the memory cgroup associated with a non-kmem folio
   391	 * @folio: Pointer to the folio.
   392	 *
   393	 * Returns a pointer to the memory cgroup associated with the folio,
   394	 * or NULL. This function assumes that the folio is known to have a
   395	 * proper memory cgroup pointer. It's not safe to call this function
   396	 * against some type of folios, e.g. slab folios or ex-slab folios or
   397	 * kmem folios.
   398	 */
 > 399	static inline struct mem_cgroup *__folio_memcg(struct folio *folio)
   400	{
 > 401		unsigned long memcg_data = folio->memcg_data;
   402	
 > 403		VM_BUG_ON_FOLIO(folio_slab(folio), folio);
   404		VM_BUG_ON_FOLIO(memcg_data & MEMCG_DATA_OBJCGS, folio);
   405		VM_BUG_ON_FOLIO(memcg_data & MEMCG_DATA_KMEM, folio);
   406	
   407		return (struct mem_cgroup *)(memcg_data & ~MEMCG_DATA_FLAGS_MASK);
   408	}
   409	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux