From: kernel test robot <lkp@intel.com>
To: Kairui Song <kasong@tencent.com>
Cc: <llvm@lists.linux.dev>, <oe-kbuild-all@lists.linux.dev>,
0day robot <lkp@intel.com>
Subject: include/linux/mm_inline.h:149:2: error: call to '__compiletime_assert_501' declared with 'error' attribute: BUILD_BUG_ON failed: fls(LRU_REFS_MAX - 1) > MAX_NR_TIERS - 1
Date: Tue, 6 Oct 2026 20:05:39 +0800 [thread overview]
Message-ID: <asTkEze6vnpRAy7f@rli9-mobl> (raw)
tree: https://github.com/intel-lab-lkp/linux/commits/Kairui-Song-via-B4-Relay/mm-memcontrol-allow-update-of-LRU-statistic-without-holding-LRU-lock/20261003-205512
head: fb7e985a90aa08774d1149de30384a36bb55bafb
commit: 1a4c8c8874fb1ac601f32faba8141125425b6f1e mm/mglru: frequency guided workingset promotion (MGLRU-FG)
config: sparc64-randconfig-1001-20261004 (https://download.01.org/0day-ci/archive/20261004/202610041334.CMzP5M1B-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 5f609f950d2e80addf5566623013db68394334db)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261004/202610041334.CMzP5M1B-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@intel.com>
| Closes: https://lore.kernel.org/r/202610041334.CMzP5M1B-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from mm/vmscan.c:30:
>> include/linux/mm_inline.h:149:2: error: call to '__compiletime_assert_501' declared with 'error' attribute: BUILD_BUG_ON failed: fls(LRU_REFS_MAX - 1) > MAX_NR_TIERS - 1
149 | BUILD_BUG_ON(fls(LRU_REFS_MAX - 1) > MAX_NR_TIERS - 1);
| ^
include/linux/build_bug.h:51:2: note: expanded from macro 'BUILD_BUG_ON'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^
include/linux/build_bug.h:40:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^
include/linux/compiler_types.h:702:2: note: expanded from macro 'compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert'
683 | prefix ## suffix(); \
| ^
<scratch space>:88:1: note: expanded from here
88 | __compiletime_assert_501
| ^
include/linux/mm_inline.h:149:2: note: called by function 'lru_tier_from_refs'
include/linux/build_bug.h:51:2: note: expanded from macro 'BUILD_BUG_ON'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^
include/linux/build_bug.h:40:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^
include/linux/compiler_types.h:702:2: note: expanded from macro 'compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert'
683 | prefix ## suffix(); \
| ^
<scratch space>:88:1: note: expanded from here
88 | __compiletime_assert_501
| ^
include/linux/mm_inline.h:149:2: note: inlined by function 'inc_min_seq'
include/linux/build_bug.h:51:2: note: expanded from macro 'BUILD_BUG_ON'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^
include/linux/build_bug.h:40:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^
include/linux/compiler_types.h:702:2: note: expanded from macro 'compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert'
683 | prefix ## suffix(); \
| ^
<scratch space>:88:1: note: expanded from here
88 | __compiletime_assert_501
| ^
include/linux/mm_inline.h:149:2: note: inlined by function 'inc_max_seq'
include/linux/build_bug.h:51:2: note: expanded from macro 'BUILD_BUG_ON'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^
include/linux/build_bug.h:40:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^
include/linux/compiler_types.h:702:2: note: expanded from macro 'compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert'
683 | prefix ## suffix(); \
| ^
<scratch space>:88:1: note: expanded from here
88 | __compiletime_assert_501
| ^
In file included from mm/vmscan.c:30:
>> include/linux/mm_inline.h:149:2: error: call to '__compiletime_assert_501' declared with 'error' attribute: BUILD_BUG_ON failed: fls(LRU_REFS_MAX - 1) > MAX_NR_TIERS - 1
149 | BUILD_BUG_ON(fls(LRU_REFS_MAX - 1) > MAX_NR_TIERS - 1);
| ^
include/linux/build_bug.h:51:2: note: expanded from macro 'BUILD_BUG_ON'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^
include/linux/build_bug.h:40:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^
include/linux/compiler_types.h:702:2: note: expanded from macro 'compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert'
683 | prefix ## suffix(); \
| ^
<scratch space>:88:1: note: expanded from here
88 | __compiletime_assert_501
| ^
include/linux/mm_inline.h:149:2: note: called by function 'lru_tier_from_refs'
include/linux/build_bug.h:51:2: note: expanded from macro 'BUILD_BUG_ON'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^
include/linux/build_bug.h:40:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^
include/linux/compiler_types.h:702:2: note: expanded from macro 'compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert'
683 | prefix ## suffix(); \
| ^
<scratch space>:88:1: note: expanded from here
88 | __compiletime_assert_501
| ^
include/linux/mm_inline.h:149:2: note: inlined by function 'sort_folio'
include/linux/build_bug.h:51:2: note: expanded from macro 'BUILD_BUG_ON'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^
include/linux/build_bug.h:40:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^
include/linux/compiler_types.h:702:2: note: expanded from macro 'compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert'
683 | prefix ## suffix(); \
| ^
<scratch space>:88:1: note: expanded from here
88 | __compiletime_assert_501
| ^
include/linux/mm_inline.h:149:2: note: inlined by function 'scan_folios'
include/linux/build_bug.h:51:2: note: expanded from macro 'BUILD_BUG_ON'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^
include/linux/build_bug.h:40:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^
include/linux/compiler_types.h:702:2: note: expanded from macro 'compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert'
683 | prefix ## suffix(); \
| ^
<scratch space>:88:1: note: expanded from here
88 | __compiletime_assert_501
| ^
include/linux/mm_inline.h:149:2: note: inlined by function 'isolate_folios'
include/linux/build_bug.h:51:2: note: expanded from macro 'BUILD_BUG_ON'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^
include/linux/build_bug.h:40:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^
include/linux/compiler_types.h:702:2: note: expanded from macro 'compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert'
683 | prefix ## suffix(); \
| ^
<scratch space>:88:1: note: expanded from here
88 | __compiletime_assert_501
| ^
include/linux/mm_inline.h:149:2: note: inlined by function 'evict_folios'
include/linux/build_bug.h:51:2: note: expanded from macro 'BUILD_BUG_ON'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^
--
In file included from mm/workingset.c:9:
>> include/linux/mm_inline.h:149:2: error: call to '__compiletime_assert_501' declared with 'error' attribute: BUILD_BUG_ON failed: fls(LRU_REFS_MAX - 1) > MAX_NR_TIERS - 1
149 | BUILD_BUG_ON(fls(LRU_REFS_MAX - 1) > MAX_NR_TIERS - 1);
| ^
include/linux/build_bug.h:51:2: note: expanded from macro 'BUILD_BUG_ON'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^
include/linux/build_bug.h:40:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^
include/linux/compiler_types.h:702:2: note: expanded from macro 'compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert'
683 | prefix ## suffix(); \
| ^
<scratch space>:183:1: note: expanded from here
183 | __compiletime_assert_501
| ^
include/linux/mm_inline.h:149:2: note: called by function 'lru_tier_from_refs'
include/linux/build_bug.h:51:2: note: expanded from macro 'BUILD_BUG_ON'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^
include/linux/build_bug.h:40:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^
include/linux/compiler_types.h:702:2: note: expanded from macro 'compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert'
683 | prefix ## suffix(); \
| ^
<scratch space>:183:1: note: expanded from here
183 | __compiletime_assert_501
| ^
include/linux/mm_inline.h:149:2: note: inlined by function 'lru_gen_eviction'
include/linux/build_bug.h:51:2: note: expanded from macro 'BUILD_BUG_ON'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^
include/linux/build_bug.h:40:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^
include/linux/compiler_types.h:702:2: note: expanded from macro 'compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert'
683 | prefix ## suffix(); \
| ^
<scratch space>:183:1: note: expanded from here
183 | __compiletime_assert_501
| ^
include/linux/mm_inline.h:149:2: note: inlined by function 'workingset_eviction'
include/linux/build_bug.h:51:2: note: expanded from macro 'BUILD_BUG_ON'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^
include/linux/build_bug.h:40:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^
include/linux/compiler_types.h:702:2: note: expanded from macro 'compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert'
683 | prefix ## suffix(); \
| ^
<scratch space>:183:1: note: expanded from here
183 | __compiletime_assert_501
| ^
In file included from mm/workingset.c:9:
>> include/linux/mm_inline.h:149:2: error: call to '__compiletime_assert_501' declared with 'error' attribute: BUILD_BUG_ON failed: fls(LRU_REFS_MAX - 1) > MAX_NR_TIERS - 1
149 | BUILD_BUG_ON(fls(LRU_REFS_MAX - 1) > MAX_NR_TIERS - 1);
| ^
include/linux/build_bug.h:51:2: note: expanded from macro 'BUILD_BUG_ON'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^
include/linux/build_bug.h:40:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^
include/linux/compiler_types.h:702:2: note: expanded from macro 'compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert'
683 | prefix ## suffix(); \
| ^
<scratch space>:183:1: note: expanded from here
183 | __compiletime_assert_501
| ^
include/linux/mm_inline.h:149:2: note: called by function 'lru_tier_from_refs'
include/linux/build_bug.h:51:2: note: expanded from macro 'BUILD_BUG_ON'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^
include/linux/build_bug.h:40:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^
include/linux/compiler_types.h:702:2: note: expanded from macro 'compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert'
683 | prefix ## suffix(); \
| ^
<scratch space>:183:1: note: expanded from here
183 | __compiletime_assert_501
| ^
include/linux/mm_inline.h:149:2: note: inlined by function 'lru_gen_refault'
include/linux/build_bug.h:51:2: note: expanded from macro 'BUILD_BUG_ON'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^
include/linux/build_bug.h:40:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^
include/linux/compiler_types.h:702:2: note: expanded from macro 'compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert'
683 | prefix ## suffix(); \
| ^
<scratch space>:183:1: note: expanded from here
183 | __compiletime_assert_501
| ^
include/linux/mm_inline.h:149:2: note: inlined by function 'workingset_refault'
include/linux/build_bug.h:51:2: note: expanded from macro 'BUILD_BUG_ON'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^
include/linux/build_bug.h:40:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^
include/linux/compiler_types.h:702:2: note: expanded from macro 'compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert'
683 | prefix ## suffix(); \
| ^
<scratch space>:183:1: note: expanded from here
183 | __compiletime_assert_501
| ^
2 errors generated.
vim +149 include/linux/mm_inline.h
ac35a490237446b Yu Zhao 2022-09-18 146
1a4c8c8874fb1ac Kairui Song 2026-10-03 147 static inline int lru_tier_from_refs(unsigned int refs)
ac35a490237446b Yu Zhao 2022-09-18 148 {
1a4c8c8874fb1ac Kairui Song 2026-10-03 @149 BUILD_BUG_ON(fls(LRU_REFS_MAX - 1) > MAX_NR_TIERS - 1);
1a4c8c8874fb1ac Kairui Song 2026-10-03 150 VM_WARN_ON_ONCE(refs > LRU_REFS_MAX);
1a4c8c8874fb1ac Kairui Song 2026-10-03 151 if (refs < LRU_REFS_WORKINGSET)
1a4c8c8874fb1ac Kairui Song 2026-10-03 152 return 0;
1a4c8c8874fb1ac Kairui Song 2026-10-03 153 return fls(refs - 1);
ac35a490237446b Yu Zhao 2022-09-18 154 }
ac35a490237446b Yu Zhao 2022-09-18 155
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-10-06 12:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=asTkEze6vnpRAy7f@rli9-mobl \
--to=lkp@intel.com \
--cc=kasong@tencent.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox