Re: [PATCH v5 3/4] mm: memcontrol: add interfaces for swap tier selection

From: kernel test robot

Date: Sun Mar 29 2026 - 07:11:07 EST


Hi Youngjun,

kernel test robot noticed the following build errors:

[auto build test ERROR on 6381a729fa7dda43574d93ab9c61cec516dd885b]

url: https://github.com/intel-lab-lkp/linux/commits/Youngjun-Park/mm-swap-introduce-swap-tier-infrastructure/20260327-203639
base: 6381a729fa7dda43574d93ab9c61cec516dd885b
patch link: https://lore.kernel.org/r/20260325175453.2523280-4-youngjun.park%40lge.com
patch subject: [PATCH v5 3/4] mm: memcontrol: add interfaces for swap tier selection
config: hexagon-randconfig-002-20260329 (https://download.01.org/0day-ci/archive/20260329/202603291945.9q4pyvON-lkp@xxxxxxxxx/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 054e11d1a17e5ba88bb1a8ef32fad3346e80b186)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260329/202603291945.9q4pyvON-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/202603291945.9q4pyvON-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

mm/swap_tier.c:141:10: warning: format specifies type 'long' but the argument has type '__ptrdiff_t' (aka 'int') [-Wformat]
139 | len += sysfs_emit_at(buf, len, "%-16s %-5ld %-11d %-11d\n",
| ~~~~~
| %-5td
140 | tier->name,
141 | TIER_IDX(tier),
| ^~~~~~~~~~~~~~
mm/swap_tier.c:33:24: note: expanded from macro 'TIER_IDX'
33 | #define TIER_IDX(tier) ((tier) - swap_tiers)
| ^~~~~~~~~~~~~~~~~~~~~
>> mm/swap_tier.c:342:8: error: incomplete definition of type 'struct mem_cgroup'
342 | child->tier_mask |= mask;
| ~~~~~^
include/linux/mm_types.h:36:8: note: forward declaration of 'struct mem_cgroup'
36 | struct mem_cgroup;
| ^
mm/swap_tier.c:343:8: error: incomplete definition of type 'struct mem_cgroup'
343 | child->tier_effective_mask |= mask;
| ~~~~~^
include/linux/mm_types.h:36:8: note: forward declaration of 'struct mem_cgroup'
36 | struct mem_cgroup;
| ^
mm/swap_tier.c:420:20: error: incomplete definition of type 'struct mem_cgroup'
420 | = parent ? parent->tier_effective_mask : TIER_ALL_MASK;
| ~~~~~~^
include/linux/mm_types.h:36:8: note: forward declaration of 'struct mem_cgroup'
36 | struct mem_cgroup;
| ^
mm/swap_tier.c:422:7: error: incomplete definition of type 'struct mem_cgroup'
422 | memcg->tier_effective_mask
| ~~~~~^
include/linux/mm_types.h:36:8: note: forward declaration of 'struct mem_cgroup'
36 | struct mem_cgroup;
| ^
mm/swap_tier.c:423:27: error: incomplete definition of type 'struct mem_cgroup'
423 | = effective_mask & memcg->tier_mask;
| ~~~~~^
include/linux/mm_types.h:36:8: note: forward declaration of 'struct mem_cgroup'
36 | struct mem_cgroup;
| ^
1 warning and 5 errors generated.


vim +342 mm/swap_tier.c

330
331 /*
332 * When a tier is removed, set its bit in every memcg's tier_mask and
333 * tier_effective_mask. This prevents stale tier indices from being
334 * silently filtered out if the same index is reused later.
335 */
336 static void swap_tier_memcg_propagate(int mask)
337 {
338 struct mem_cgroup *child;
339
340 rcu_read_lock();
341 for_each_mem_cgroup_tree(child, root_mem_cgroup) {
> 342 child->tier_mask |= mask;
343 child->tier_effective_mask |= mask;
344 }
345 rcu_read_unlock();
346 }
347

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