Re: [PATCH 2/3] mm: shrinker: optimize the allocation of shrinker_info when setting cgroup_memory_nokmem
From: kernel test robot
Date: Sat Mar 07 2026 - 12:35:59 EST
Hi Haifeng,
kernel test robot noticed the following build errors:
[auto build test ERROR on linus/master]
[also build test ERROR on v7.0-rc2 next-20260306]
[cannot apply to akpm-mm/mm-everything]
[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/Haifeng-Xu/mm-shrinker-introduce-new-function-get_shrinker_id/20260306-160247
base: linus/master
patch link: https://lore.kernel.org/r/20260306075757.198887-3-haifeng.xu%40shopee.com
patch subject: [PATCH 2/3] mm: shrinker: optimize the allocation of shrinker_info when setting cgroup_memory_nokmem
config: i386-randconfig-004-20260307 (https://download.01.org/0day-ci/archive/20260308/202603080143.ehWbe58J-lkp@xxxxxxxxx/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260308/202603080143.ehWbe58J-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/202603080143.ehWbe58J-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
mm/huge_memory.c: In function 'deferred_split_folio':
>> mm/huge_memory.c:4355:57: error: 'struct shrinker' has no member named 'id'
4355 | int id = deferred_split_shrinker->id;
| ^~
>> mm/huge_memory.c:4358:61: error: 'struct shrinker' has no member named 'nonslab_id'
4358 | id = deferred_split_shrinker->nonslab_id;
| ^~
vim +4355 mm/huge_memory.c
4307
4308 /* partially_mapped=false won't clear PG_partially_mapped folio flag */
4309 void deferred_split_folio(struct folio *folio, bool partially_mapped)
4310 {
4311 struct deferred_split *ds_queue;
4312 unsigned long flags;
4313
4314 /*
4315 * Order 1 folios have no space for a deferred list, but we also
4316 * won't waste much memory by not adding them to the deferred list.
4317 */
4318 if (folio_order(folio) <= 1)
4319 return;
4320
4321 if (!partially_mapped && !split_underused_thp)
4322 return;
4323
4324 /*
4325 * Exclude swapcache: originally to avoid a corrupt deferred split
4326 * queue. Nowadays that is fully prevented by memcg1_swapout();
4327 * but if page reclaim is already handling the same folio, it is
4328 * unnecessary to handle it again in the shrinker, so excluding
4329 * swapcache here may still be a useful optimization.
4330 */
4331 if (folio_test_swapcache(folio))
4332 return;
4333
4334 ds_queue = folio_split_queue_lock_irqsave(folio, &flags);
4335 if (partially_mapped) {
4336 if (!folio_test_partially_mapped(folio)) {
4337 folio_set_partially_mapped(folio);
4338 if (folio_test_pmd_mappable(folio))
4339 count_vm_event(THP_DEFERRED_SPLIT_PAGE);
4340 count_mthp_stat(folio_order(folio), MTHP_STAT_SPLIT_DEFERRED);
4341 mod_mthp_stat(folio_order(folio), MTHP_STAT_NR_ANON_PARTIALLY_MAPPED, 1);
4342
4343 }
4344 } else {
4345 /* partially mapped folios cannot become non-partially mapped */
4346 VM_WARN_ON_FOLIO(folio_test_partially_mapped(folio), folio);
4347 }
4348 if (list_empty(&folio->_deferred_list)) {
4349 struct mem_cgroup *memcg;
4350
4351 memcg = folio_split_queue_memcg(folio, ds_queue);
4352 list_add_tail(&folio->_deferred_list, &ds_queue->split_queue);
4353 ds_queue->split_queue_len++;
4354 if (memcg) {
> 4355 int id = deferred_split_shrinker->id;
4356
4357 if (!memcg_kmem_online() && memcg != root_mem_cgroup)
> 4358 id = deferred_split_shrinker->nonslab_id;
4359
4360 set_shrinker_bit(memcg, folio_nid(folio), id);
4361 }
4362 }
4363 split_queue_unlock_irqrestore(ds_queue, flags);
4364 }
4365
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki