[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202408272341.k4cl3jz0-lkp@intel.com>
Date: Wed, 28 Aug 2024 00:03:19 +0800
From: kernel test robot <lkp@...el.com>
To: Shakeel Butt <shakeel.butt@...ux.dev>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
Linux Memory Management List <linux-mm@...ck.org>,
Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Muchun Song <muchun.song@...ux.dev>,
Vlastimil Babka <vbabka@...e.cz>,
David Rientjes <rientjes@...gle.com>,
Hyeonggon Yoo <42.hyeyoo@...il.com>,
Eric Dumazet <edumazet@...gle.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
linux-kernel@...r.kernel.org,
Meta kernel team <kernel-team@...a.com>, cgroups@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH v1] memcg: add charging of already allocated slab objects
Hi Shakeel,
kernel test robot noticed the following build errors:
[auto build test ERROR on akpm-mm/mm-everything]
[also build test ERROR on linus/master v6.11-rc5 next-20240827]
[cannot apply to vbabka-slab/for-next]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Shakeel-Butt/memcg-add-charging-of-already-allocated-slab-objects/20240827-073150
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20240826232908.4076417-1-shakeel.butt%40linux.dev
patch subject: [PATCH v1] memcg: add charging of already allocated slab objects
config: s390-allnoconfig (https://download.01.org/0day-ci/archive/20240827/202408272341.k4cl3jz0-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 08e5a1de8227512d4774a534b91cb2353cef6284)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240827/202408272341.k4cl3jz0-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408272341.k4cl3jz0-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from mm/slub.c:13:
In file included from include/linux/mm.h:2198:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
In file included from mm/slub.c:49:
In file included from mm/internal.h:13:
include/linux/mm_inline.h:47:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
47 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
| ~~~~~~~~~~~ ^ ~~~
include/linux/mm_inline.h:49:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
49 | NR_ZONE_LRU_BASE + lru, nr_pages);
| ~~~~~~~~~~~~~~~~ ^ ~~~
>> mm/slub.c:4115:31: error: no member named 'objcg' in 'struct slabobj_ext'
4115 | if (unlikely(slab_exts[off].objcg))
| ~~~~~~~~~~~~~~ ^
include/linux/compiler.h:77:42: note: expanded from macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
3 warnings and 1 error generated.
vim +4115 mm/slub.c
4085
4086 #define KMALLOC_TYPE (SLAB_KMALLOC | SLAB_CACHE_DMA | \
4087 SLAB_ACCOUNT | SLAB_RECLAIM_ACCOUNT)
4088
4089 bool kmem_cache_charge(void *objp, gfp_t gfpflags)
4090 {
4091 struct slabobj_ext *slab_exts;
4092 struct kmem_cache *s;
4093 struct folio *folio;
4094 struct slab *slab;
4095 unsigned long off;
4096
4097 if (!memcg_kmem_online())
4098 return true;
4099
4100 folio = virt_to_folio(objp);
4101 if (unlikely(!folio_test_slab(folio)))
4102 return false;
4103
4104 slab = folio_slab(folio);
4105 s = slab->slab_cache;
4106
4107 /* Ignore KMALLOC_NORMAL cache to avoid circular dependency. */
4108 if ((s->flags & KMALLOC_TYPE) == SLAB_KMALLOC)
4109 return true;
4110
4111 /* Ignore already charged objects. */
4112 slab_exts = slab_obj_exts(slab);
4113 if (slab_exts) {
4114 off = obj_to_index(s, slab, objp);
> 4115 if (unlikely(slab_exts[off].objcg))
4116 return true;
4117 }
4118
4119 return memcg_slab_post_charge(s, objp, gfpflags);
4120 }
4121 EXPORT_SYMBOL(kmem_cache_charge);
4122
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists