From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 055CAC7EE32 for ; Sat, 28 Jun 2025 07:52:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 742006B0096; Sat, 28 Jun 2025 03:52:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6F3496B0098; Sat, 28 Jun 2025 03:52:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 60A376B0099; Sat, 28 Jun 2025 03:52:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 4E3C56B0096 for ; Sat, 28 Jun 2025 03:52:43 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 3AB89122E8D for ; Sat, 28 Jun 2025 07:52:42 +0000 (UTC) X-FDA: 83604042564.13.F9AFA81 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by imf17.hostedemail.com (Postfix) with ESMTP id 8B20040008 for ; Sat, 28 Jun 2025 07:52:39 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=ZzTQ2j6J; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf17.hostedemail.com: domain of lkp@intel.com designates 198.175.65.15 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1751097160; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=FlUcttjP+AUadkmkXzNMSBisWavK+91tkkv8fVjZSXc=; b=3jFmgFwYlunkx6wowstQCvfKw+SEOr2E96a8DGnQklFB/nfO6XchmzE+CZzZqSjNdVeg3w R2WTNiyM4Z4ZfOCBYC2BzTZn7zRn+ZmGl5qYXBSqOdMQAL7mDQAL1xNB7l0FdTLIhjJwqs oCA1nmMMDW3jXDu1oOA8AGSqKY7dyow= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1751097160; a=rsa-sha256; cv=none; b=gZPv05ojicdijQVERoMcR9waLLEr9s5Arec72wOEd1EZ/EymM5NuH6SptwIGd5pAtVT0bK g313lRzBex5JcfduFXX1hq/3rJ598YK6k6VhLUB9GhTTBiUEgBuowiuIlihsxh2j1Hg7qt TSVD7YanxC7AA0kof4Iwmst4TVWpC2k= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=ZzTQ2j6J; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf17.hostedemail.com: domain of lkp@intel.com designates 198.175.65.15 as permitted sender) smtp.mailfrom=lkp@intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1751097159; x=1782633159; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=zw8+XZcRIWHl4Pb7ANDvCfIV/XjuEkN0+TvXI1VOw6E=; b=ZzTQ2j6JFWk9aRJ+MQOY8cPftAlKewc3k1b6upn2T4qh2bPnqr/OjRRe yCRR/7mA37akcGCJ+6FI8Gxh/JvxUOx7vWCsJo9smxgeV3jB86GlAVzaJ XrkKSFOuXo6IawPiDoYu8RJsHxo/+V+vMw5/szpAG17cRhGznhQN00Zyo vok5Ykjg3ews0WV7keYzMscbxtWxK21lC28W/G2RVhYkmR0MpLKBHgtBx p0qKqvqncp1pQiG7trtp2iqlj6nF4s/QEvmveEZHVoi5nHu1RpPrXH2lG TVHfJgMWIu5WS/x5jZIbJG7ePsGOV/D0J9YxLad8DB5PouGFy33bdNrn/ Q==; X-CSE-ConnectionGUID: E8il5QFGQAmbCxqvN/p6xA== X-CSE-MsgGUID: RzREdHmGSzS67GEfcZrfeA== X-IronPort-AV: E=McAfee;i="6800,10657,11477"; a="57081104" X-IronPort-AV: E=Sophos;i="6.16,272,1744095600"; d="scan'208";a="57081104" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2025 00:52:38 -0700 X-CSE-ConnectionGUID: wIItiP6PSA6co7huGb8zmQ== X-CSE-MsgGUID: SPfVjudESzKsKbdwnJfnrA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,272,1744095600"; d="scan'208";a="153088228" Received: from lkp-server01.sh.intel.com (HELO e8142ee1dce2) ([10.239.97.150]) by fmviesa006.fm.intel.com with ESMTP; 28 Jun 2025 00:52:35 -0700 Received: from kbuild by e8142ee1dce2 with local (Exim 4.96) (envelope-from ) id 1uVQMT-000Wuk-1w; Sat, 28 Jun 2025 07:52:33 +0000 Date: Sat, 28 Jun 2025 15:52:27 +0800 From: kernel test robot To: zhongjinji@honor.com, linux-mm@kvack.org Cc: oe-kbuild-all@lists.linux.dev, akpm@linux-foundation.org, yuzhao@google.com, linux-kernel@vger.kernel.org, yipengxiang@honor.com, liulu.liu@honor.com, feng.han@honor.com Subject: Re: [PATCH] mm: vmscan: Page scanning depends on swappiness and refault Message-ID: <202506281559.f6IHM6uJ-lkp@intel.com> References: <20250627162606.30609-1-zhongjinji@honor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250627162606.30609-1-zhongjinji@honor.com> X-Stat-Signature: qgzoj3ah38dr94jh84aipmhgb4m71ddb X-Rspamd-Queue-Id: 8B20040008 X-Rspam-User: X-Rspamd-Server: rspam07 X-HE-Tag: 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Y2Jetyu7WKWaSzCch4N53jDqh9rRgspbGKOqZh9VZSXZ76tXywKoejgExonqgop7seN4RkQ10bTod4Lw09BBrt8pzo2jE9VBaXqSHKZfNwkQeSMD67Ww83jU1Tgs16nnABgX1NQXA2uOzg14XTRtNJhtz611aaPYvhs4sWj2lCkPoGF2ZIKOiUQtz3LrDcjJBI/GODI++QiyJCZlSbjZOhD6yngO8jElYCrhQtvi4TvclFkI2BmskCidbBJiy7vadaxm7XOFcC4NvaDC6gEE+c17zRKbz02BBhz34LVt7z1y7gaLxjUSU2c80CLC4pbxSQMqeNLamOZjdzI7x6/b68rYQiF6YkeKAdECh8d X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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 | 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