Re: [PATCH v5] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block order

From: kernel test robot
Date: Sun May 18 2025 - 07:06:36 EST


Hi Juan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on akpm-mm/mm-everything]

url: https://github.com/intel-lab-lkp/linux/commits/Juan-Yescas/mm-Add-CONFIG_PAGE_BLOCK_ORDER-to-select-page-block-order/20250517-072434
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20250516232341.659513-1-jyescas%40google.com
patch subject: [PATCH v5] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block order
config: i386-randconfig-r072-20250518 (https://download.01.org/0day-ci/archive/20250518/202505181825.FdKgAQ16-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0

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/202505181825.FdKgAQ16-lkp@xxxxxxxxx/

smatch warnings:
mm/compaction.c:302 pageblock_skip_persistent() warn: always true condition '(compound_order(page) >= (((((22 - 12))) < ((0))) ?(((22 - 12))):((0)))) => (0-u32max >= 0)'
mm/page_alloc.c:618 compaction_capture() warn: unsigned 'order' is never less than zero.

vim +302 mm/compaction.c

9721fd82351d47a Baolin Wang 2023-06-14 289
21dc7e023611fbc David Rientjes 2017-11-17 290 /*
2271b016bf368d1 Hui Su 2020-12-14 291 * Compound pages of >= pageblock_order should consistently be skipped until
b527cfe5bc23208 Vlastimil Babka 2017-11-17 292 * released. It is always pointless to compact pages of such order (if they are
b527cfe5bc23208 Vlastimil Babka 2017-11-17 293 * migratable), and the pageblocks they occupy cannot contain any free pages.
21dc7e023611fbc David Rientjes 2017-11-17 294 */
b527cfe5bc23208 Vlastimil Babka 2017-11-17 295 static bool pageblock_skip_persistent(struct page *page)
21dc7e023611fbc David Rientjes 2017-11-17 296 {
b527cfe5bc23208 Vlastimil Babka 2017-11-17 297 if (!PageCompound(page))
21dc7e023611fbc David Rientjes 2017-11-17 298 return false;
b527cfe5bc23208 Vlastimil Babka 2017-11-17 299
b527cfe5bc23208 Vlastimil Babka 2017-11-17 300 page = compound_head(page);
b527cfe5bc23208 Vlastimil Babka 2017-11-17 301
b527cfe5bc23208 Vlastimil Babka 2017-11-17 @302 if (compound_order(page) >= pageblock_order)
21dc7e023611fbc David Rientjes 2017-11-17 303 return true;
b527cfe5bc23208 Vlastimil Babka 2017-11-17 304
b527cfe5bc23208 Vlastimil Babka 2017-11-17 305 return false;
21dc7e023611fbc David Rientjes 2017-11-17 306 }
21dc7e023611fbc David Rientjes 2017-11-17 307

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