[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202506281559.f6IHM6uJ-lkp@intel.com>
Date: Sat, 28 Jun 2025 15:52:27 +0800
From: kernel test robot <lkp@...el.com>
To: zhongjinji@...or.com, linux-mm@...ck.org
Cc: oe-kbuild-all@...ts.linux.dev, akpm@...ux-foundation.org,
yuzhao@...gle.com, linux-kernel@...r.kernel.org,
yipengxiang@...or.com, liulu.liu@...or.com, feng.han@...or.com
Subject: Re: [PATCH] mm: vmscan: Page scanning depends on swappiness and
refault
Hi,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.16-rc3]
[cannot apply to akpm-mm/mm-everything next-20250627]
[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/zhongjinji-honor-com/mm-vmscan-Page-scanning-depends-on-swappiness-and-refault/20250628-002820
base: linus/master
patch link: https://lore.kernel.org/r/20250627162606.30609-1-zhongjinji%40honor.com
patch subject: [PATCH] mm: vmscan: Page scanning depends on swappiness and refault
config: x86_64-buildonly-randconfig-003-20250628 (https://download.01.org/0day-ci/archive/20250628/202506281559.f6IHM6uJ-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250628/202506281559.f6IHM6uJ-lkp@intel.com/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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506281559.f6IHM6uJ-lkp@intel.com/
All warnings (new ones prefixed by >>):
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/vmscan.c:4100:20: note: in expansion of macro 'READ_ONCE'
4100 | if (seq <= READ_ONCE(mm_state->.seq))
| ^~~~~~~~~
mm/vmscan.c:4100:40: error: expected identifier before '.' token
4100 | if (seq <= READ_ONCE(mm_state->.seq))
| ^
include/linux/compiler_types.h:548:23: note: in definition of macro '__compiletime_assert'
548 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:568:9: note: in expansion of macro '_compiletime_assert'
568 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/vmscan.c:4100:20: note: in expansion of macro 'READ_ONCE'
4100 | if (seq <= READ_ONCE(mm_state->.seq))
| ^~~~~~~~~
mm/vmscan.c:4100:40: error: expected identifier before '.' token
4100 | if (seq <= READ_ONCE(mm_state->.seq))
| ^
include/linux/compiler_types.h:548:23: note: in definition of macro '__compiletime_assert'
548 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:568:9: note: in expansion of macro '_compiletime_assert'
568 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/vmscan.c:4100:20: note: in expansion of macro 'READ_ONCE'
4100 | if (seq <= READ_ONCE(mm_state->.seq))
| ^~~~~~~~~
mm/vmscan.c:4100:40: error: expected identifier before '.' token
4100 | if (seq <= READ_ONCE(mm_state->.seq))
| ^
include/linux/compiler_types.h:548:23: note: in definition of macro '__compiletime_assert'
548 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:568:9: note: in expansion of macro '_compiletime_assert'
568 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/vmscan.c:4100:20: note: in expansion of macro 'READ_ONCE'
4100 | if (seq <= READ_ONCE(mm_state->.seq))
| ^~~~~~~~~
mm/vmscan.c:4100:40: error: expected identifier before '.' token
4100 | if (seq <= READ_ONCE(mm_state->.seq))
| ^
include/linux/compiler_types.h:518:27: note: in definition of macro '__unqual_scalar_typeof'
518 | _Generic((x), \
| ^
include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE'
50 | __READ_ONCE(x); \
| ^~~~~~~~~~~
mm/vmscan.c:4100:20: note: in expansion of macro 'READ_ONCE'
4100 | if (seq <= READ_ONCE(mm_state->.seq))
| ^~~~~~~~~
In file included from ./arch/x86/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:390,
from include/asm-generic/bug.h:5,
from arch/x86/include/asm/bug.h:103,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:6,
from mm/vmscan.c:15:
mm/vmscan.c:4100:40: error: expected identifier before '.' token
4100 | if (seq <= READ_ONCE(mm_state->.seq))
| ^
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
mm/vmscan.c:4100:20: note: in expansion of macro 'READ_ONCE'
4100 | if (seq <= READ_ONCE(mm_state->.seq))
| ^~~~~~~~~
>> mm/vmscan.c:4097:34: warning: variable 'mm_state' set but not used [-Wunused-but-set-variable]
4097 | struct lru_gen_mm_state *mm_state = get_mm_state(lruvec, type);
| ^~~~~~~~
mm/vmscan.c: In function 'try_to_inc_max_seq':
mm/vmscan.c:4154:17: error: implicit declaration of function 'for_each_age_able_type'; did you mean 'for_each_evictable_type'? [-Werror=implicit-function-declaration]
4154 | for_each_age_able_type(type, can_age) {
| ^~~~~~~~~~~~~~~~~~~~~~
| for_each_evictable_type
mm/vmscan.c:4154:54: error: expected ';' before '{' token
4154 | for_each_age_able_type(type, can_age) {
| ^~
| ;
mm/vmscan.c: At top level:
>> mm/vmscan.c:3876:13: warning: 'walk_mm' defined but not used [-Wunused-function]
3876 | static void walk_mm(struct mm_struct *mm, struct lru_gen_mm_walk *walk)
| ^~~~~~~
>> mm/vmscan.c:3103:13: warning: 'iterate_mm_list' defined but not used [-Wunused-function]
3103 | static bool iterate_mm_list(struct lru_gen_mm_walk *walk, struct mm_struct **iter, int type)
| ^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/mm_state +4097 mm/vmscan.c
4093
4094 static bool can_mm_list_age(struct lruvec *lruvec, struct lru_gen_mm_walk *walk,
4095 int type, unsigned long seq)
4096 {
> 4097 struct lru_gen_mm_state *mm_state = get_mm_state(lruvec, type);
4098
4099 /* see the comment in iterate_mm_list() */
> 4100 if (seq <= READ_ONCE(mm_state->.seq))
4101 return false;
4102
4103 /*
4104 * If the hardware doesn't automatically set the accessed bit, fallback
4105 * to lru_gen_look_around(), which only clears the accessed bit in a
4106 * handful of PTEs. Spreading the work out over a period of time usually
4107 * is less efficient, but it avoids bursty page faults.
4108 */
4109 if (!should_walk_mmu()) {
4110 return iterate_mm_list_nowalk(lruvec, type, seq);
4111 }
4112
4113 walk = set_mm_walk(NULL, true);
4114 if (!walk) {
4115 return iterate_mm_list_nowalk(lruvec, type, seq);
4116 }
4117
4118 return true;
4119 }
4120
4121 static bool try_to_inc_max_seq(struct lruvec *lruvec, unsigned long *seq,
4122 bool *can_age, bool force_scan)
4123 {
4124 int type;
4125 bool success;
4126 struct lru_gen_mm_walk *walk = NULL;
4127 struct mm_struct *mm = NULL;
4128 struct lru_gen_folio *lrugen = &lruvec->lrugen;
4129
4130 if (!walk_mmu_enable())
4131 return inc_max_seq(lruvec, seq, can_age);
4132
4133 for_each_gen_type(type) {
4134 if (!can_age[type])
4135 continue;
4136 VM_WARN_ON_ONCE(seq[type] > READ_ONCE(lrugen->max_seq[type]));
4137
4138 can_age[type] = can_mm_list_age(lruvec, walk, type, seq[type]);
4139 }
4140
4141 success = can_age[LRU_GEN_ANON] || can_age[LRU_GEN_FILE];
4142 if (!success || !walk)
4143 goto done;
4144
4145 walk->lruvec = lruvec;
4146 walk->force_scan = force_scan;
4147
4148 for_each_gen_type(type) {
4149 walk->seq[type] = seq[type];
4150 walk->can_age[type] = can_age[type];
4151 }
4152
4153 do {
> 4154 for_each_age_able_type(type, can_age) {
4155 can_age[type] = iterate_mm_list(walk, &mm, type);
4156 }
4157 if (mm)
4158 walk_mm(mm, walk);
4159 } while (mm);
4160
4161 success = can_age[LRU_GEN_ANON] || can_age[LRU_GEN_FILE];
4162 done:
4163 if (success) {
4164 success = inc_max_seq(lruvec, seq, can_age);
4165 WARN_ON_ONCE(!success);
4166 }
4167
4168 return success;
4169 }
4170
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists