Re: [PATCH v2 4/4] mm: thp: reparent the split queue during memcg offline

From: kernel test robot

Date: Wed Sep 24 2025 - 09:50:19 EST


Hi Qi,

kernel test robot noticed the following build errors:

[auto build test ERROR on next-20250922]
[also build test ERROR on v6.17-rc7]
[cannot apply to akpm-mm/mm-everything rppt-memblock/for-next rppt-memblock/fixes linus/master v6.17-rc7 v6.17-rc6 v6.17-rc5]
[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/Qi-Zheng/mm-thp-replace-folio_memcg-with-folio_memcg_charged/20250923-171935
base: next-20250922
patch link: https://lore.kernel.org/r/55370bda7b2df617033ac12116c1712144bb7591.1758618527.git.zhengqi.arch%40bytedance.com
patch subject: [PATCH v2 4/4] mm: thp: reparent the split queue during memcg offline
config: riscv-randconfig-001-20250924 (https://download.01.org/0day-ci/archive/20250924/202509242123.QwwFy7gc-lkp@xxxxxxxxx/config)
compiler: riscv64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250924/202509242123.QwwFy7gc-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509242123.QwwFy7gc-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

mm/huge_memory.c: In function 'reparent_deferred_split_queue':
>> mm/huge_memory.c:4302:42: error: dereferencing pointer to incomplete type 'struct mem_cgroup'
struct deferred_split *ds_queue = &memcg->deferred_split_queue;
^~

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for ARCH_HAS_ELF_CORE_EFLAGS
Depends on [n]: BINFMT_ELF [=n] && ELF_CORE [=n]
Selected by [y]:
- RISCV [=y]


vim +4302 mm/huge_memory.c

4298
4299 void reparent_deferred_split_queue(struct mem_cgroup *memcg)
4300 {
4301 struct mem_cgroup *parent = parent_mem_cgroup(memcg);
> 4302 struct deferred_split *ds_queue = &memcg->deferred_split_queue;
4303 struct deferred_split *parent_ds_queue = &parent->deferred_split_queue;
4304 int nid;
4305
4306 spin_lock_irq(&ds_queue->split_queue_lock);
4307 spin_lock_nested(&parent_ds_queue->split_queue_lock, SINGLE_DEPTH_NESTING);
4308
4309 if (!ds_queue->split_queue_len)
4310 goto unlock;
4311
4312 list_splice_tail_init(&ds_queue->split_queue, &parent_ds_queue->split_queue);
4313 parent_ds_queue->split_queue_len += ds_queue->split_queue_len;
4314 ds_queue->split_queue_len = 0;
4315 /* Mark the ds_queue dead */
4316 ds_queue->is_dying = true;
4317
4318 for_each_node(nid)
4319 set_shrinker_bit(parent, nid, shrinker_id(deferred_split_shrinker));
4320
4321 unlock:
4322 spin_unlock(&parent_ds_queue->split_queue_lock);
4323 spin_unlock_irq(&ds_queue->split_queue_lock);
4324 }
4325

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki