* [openeuler:OLK-5.10 1213/30000] mm/memcontrol.c:7050 uncharge_page() error: uninitialized symbol 'objcg'.
@ 2024-10-22 11:35 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-22 11:35 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: kernel@openeuler.org
TO: Zheng Zengkai <zhengzengkai@huawei.com>
tree: https://gitee.com/openeuler/kernel.git OLK-5.10
head: 950c74b8b6db893114b092f9fd2548037daa73f7
commit: 63472377281639f1cce1e1328288a69f9ed8beba [1213/30000] mm: memcontrol: use obj_cgroup APIs to charge kmem pages
:::::: branch date: 28 hours ago
:::::: commit date: 3 years ago
config: x86_64-randconfig-161-20241022 (https://download.01.org/0day-ci/archive/20241022/202410221923.9WVki2nh-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202410221923.9WVki2nh-lkp@intel.com/
smatch warnings:
mm/memcontrol.c:7050 uncharge_page() error: uninitialized symbol 'objcg'.
vim +/objcg +7050 mm/memcontrol.c
747db954cab64c Johannes Weiner 2014-08-08 7003
a9d5adeeb4b2c7 Jérôme Glisse 2017-09-08 7004 static void uncharge_page(struct page *page, struct uncharge_gather *ug)
747db954cab64c Johannes Weiner 2014-08-08 7005 {
9f762dbe19b9f1 Johannes Weiner 2020-06-03 7006 unsigned long nr_pages;
63472377281639 Muchun Song 2021-10-30 7007 struct mem_cgroup *memcg;
63472377281639 Muchun Song 2021-10-30 7008 struct obj_cgroup *objcg;
9f762dbe19b9f1 Johannes Weiner 2020-06-03 7009
747db954cab64c Johannes Weiner 2014-08-08 7010 VM_BUG_ON_PAGE(PageLRU(page), page);
747db954cab64c Johannes Weiner 2014-08-08 7011
747db954cab64c Johannes Weiner 2014-08-08 7012 /*
747db954cab64c Johannes Weiner 2014-08-08 7013 * Nobody should be changing or seriously looking at
63472377281639 Muchun Song 2021-10-30 7014 * page memcg or objcg at this point, we have fully
2983331575bfb2 Johannes Weiner 2014-12-10 7015 * exclusive access to the page.
747db954cab64c Johannes Weiner 2014-08-08 7016 */
63472377281639 Muchun Song 2021-10-30 7017 if (PageMemcgKmem(page)) {
63472377281639 Muchun Song 2021-10-30 7018 objcg = __page_objcg(page);
63472377281639 Muchun Song 2021-10-30 7019 /*
63472377281639 Muchun Song 2021-10-30 7020 * This get matches the put at the end of the function and
63472377281639 Muchun Song 2021-10-30 7021 * kmem pages do not hold memcg references anymore.
63472377281639 Muchun Song 2021-10-30 7022 */
63472377281639 Muchun Song 2021-10-30 7023 memcg = get_mem_cgroup_from_objcg(objcg);
63472377281639 Muchun Song 2021-10-30 7024 } else {
63472377281639 Muchun Song 2021-10-30 7025 memcg = __page_memcg(page);
63472377281639 Muchun Song 2021-10-30 7026 }
63472377281639 Muchun Song 2021-10-30 7027
63472377281639 Muchun Song 2021-10-30 7028 if (!memcg)
63472377281639 Muchun Song 2021-10-30 7029 return;
747db954cab64c Johannes Weiner 2014-08-08 7030
63472377281639 Muchun Song 2021-10-30 7031 if (ug->memcg != memcg) {
a9d5adeeb4b2c7 Jérôme Glisse 2017-09-08 7032 if (ug->memcg) {
a9d5adeeb4b2c7 Jérôme Glisse 2017-09-08 7033 uncharge_batch(ug);
a9d5adeeb4b2c7 Jérôme Glisse 2017-09-08 7034 uncharge_gather_clear(ug);
747db954cab64c Johannes Weiner 2014-08-08 7035 }
63472377281639 Muchun Song 2021-10-30 7036 ug->memcg = memcg;
66a3bf90a949b5 Muchun Song 2021-10-30 7037 ug->dummy_page = page;
f1796544a0ca0f Michal Hocko 2020-09-04 7038
f1796544a0ca0f Michal Hocko 2020-09-04 7039 /* pairs with css_put in uncharge_batch */
63472377281639 Muchun Song 2021-10-30 7040 css_get(&memcg->css);
747db954cab64c Johannes Weiner 2014-08-08 7041 }
747db954cab64c Johannes Weiner 2014-08-08 7042
d8c6546b1aea84 Matthew Wilcox (Oracle 2019-09-23 7043) nr_pages = compound_nr(page);
9f762dbe19b9f1 Johannes Weiner 2020-06-03 7044
63472377281639 Muchun Song 2021-10-30 7045 if (PageMemcgKmem(page)) {
63472377281639 Muchun Song 2021-10-30 7046 ug->nr_memory += nr_pages;
9f762dbe19b9f1 Johannes Weiner 2020-06-03 7047 ug->nr_kmem += nr_pages;
63472377281639 Muchun Song 2021-10-30 7048
63472377281639 Muchun Song 2021-10-30 7049 page->memcg_data = 0;
63472377281639 Muchun Song 2021-10-30 @7050 obj_cgroup_put(objcg);
63472377281639 Muchun Song 2021-10-30 7051 } else {
63472377281639 Muchun Song 2021-10-30 7052 /* LRU pages aren't accounted at the root level */
63472377281639 Muchun Song 2021-10-30 7053 if (!mem_cgroup_is_root(memcg))
63472377281639 Muchun Song 2021-10-30 7054 ug->nr_memory += nr_pages;
492cf0b0c21dc6 Roman Gushchin 2021-10-30 7055 ug->pgpgout++;
747db954cab64c Johannes Weiner 2014-08-08 7056
d1b942b7ac549e Roman Gushchin 2021-10-30 7057 page->memcg_data = 0;
63472377281639 Muchun Song 2021-10-30 7058 }
63472377281639 Muchun Song 2021-10-30 7059
63472377281639 Muchun Song 2021-10-30 7060 css_put(&memcg->css);
a9d5adeeb4b2c7 Jérôme Glisse 2017-09-08 7061 }
a9d5adeeb4b2c7 Jérôme Glisse 2017-09-08 7062
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-10-22 11:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-22 11:35 [openeuler:OLK-5.10 1213/30000] mm/memcontrol.c:7050 uncharge_page() error: uninitialized symbol 'objcg' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.