Re: [PATCH 1/4] mm/swap, memcg: Introduce infrastructure for cgroup-based swap priority

From: YoungJun Park
Date: Tue Jul 22 2025 - 10:24:53 EST


On Mon, Jul 21, 2025 at 11:13:24PM +0800, kernel test robot wrote:
> Hi Youngjun,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on 347e9f5043c89695b01e66b3ed111755afcf1911]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Youngjun-Park/mm-swap-memcg-Introduce-infrastructure-for-cgroup-based-swap-priority/20250717-042648
> base: 347e9f5043c89695b01e66b3ed111755afcf1911
> patch link: https://lore.kernel.org/r/20250716202006.3640584-2-youngjun.park%40lge.com
> patch subject: [PATCH 1/4] mm/swap, memcg: Introduce infrastructure for cgroup-based swap priority
> config: loongarch-randconfig-r123-20250721 (https://download.01.org/0day-ci/archive/20250721/202507212243.Lf8fSo0T-lkp@xxxxxxxxx/config)
> compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
> reproduce: (https://download.01.org/0day-ci/archive/20250721/202507212243.Lf8fSo0T-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/202507212243.Lf8fSo0T-lkp@xxxxxxxxx/
>
> sparse warnings: (new ones prefixed by >>)
> >> mm/swap_cgroup_priority.c:115:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
> mm/swap_cgroup_priority.c:115:16: sparse: struct swap_cgroup_priority [noderef] __rcu *
> mm/swap_cgroup_priority.c:115:16: sparse: struct swap_cgroup_priority *
> mm/swap_cgroup_priority.c:729:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
> mm/swap_cgroup_priority.c:729:9: sparse: struct swap_cgroup_priority [noderef] __rcu *
> mm/swap_cgroup_priority.c:729:9: sparse: struct swap_cgroup_priority *
> mm/swap_cgroup_priority.c:638:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
> mm/swap_cgroup_priority.c:638:25: sparse: struct swap_cgroup_priority [noderef] __rcu *
> mm/swap_cgroup_priority.c:638:25: sparse: struct swap_cgroup_priority *
>
> vim +115 mm/swap_cgroup_priority.c
>
> 108
> 109 static struct swap_cgroup_priority *get_swap_cgroup_priority(
> 110 struct mem_cgroup *memcg)
> 111 {
> 112 if (!memcg)
> 113 return NULL;
> 114
> > 115 return rcu_dereference(memcg->swap_priority);
> 116 }
> 117
>

This part of the code, which retrieves the object,
is expected to be properly updated in a subsequent patch series.
Therefore, I believe it's reasonable to leave it as-is for now.

Best Regard,
Youngjun Park