Re: [v1 2/2] mm/damon: introduce DAMOS filter type hugepage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Usama,

kernel test robot noticed the following build errors:

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

url:    https://github.com/intel-lab-lkp/linux/commits/Usama-Arif/mm-damon-introduce-DAMOS-filter-type-hugepage/20250116-224546
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/20250116144436.3947318-2-usamaarif642%40gmail.com
patch subject: [v1 2/2] mm/damon: introduce DAMOS filter type hugepage
config: x86_64-randconfig-077-20250118 (https://download.01.org/0day-ci/archive/20250118/202501181819.RVctFodO-lkp@xxxxxxxxx/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250118/202501181819.RVctFodO-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/202501181819.RVctFodO-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   In file included from mm/damon/paddr.c:17:
   include/linux/mm_inline.h:47:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
      47 |         __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
         |                                    ~~~~~~~~~~~ ^ ~~~
   include/linux/mm_inline.h:49:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
      49 |                                 NR_ZONE_LRU_BASE + lru, nr_pages);
         |                                 ~~~~~~~~~~~~~~~~ ^ ~~~
>> mm/damon/paddr.c:226:34: error: call to '__compiletime_assert_603' declared with 'error' attribute: BUILD_BUG failed
     226 |                 matched = folio_size(folio) == HPAGE_PMD_SIZE;
         |                                                ^
   include/linux/huge_mm.h:111:34: note: expanded from macro 'HPAGE_PMD_SIZE'
     111 | #define HPAGE_PMD_SIZE  ((1UL) << HPAGE_PMD_SHIFT)
         |                                   ^
   include/linux/huge_mm.h:104:28: note: expanded from macro 'HPAGE_PMD_SHIFT'
     104 | #define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; })
         |                            ^
   include/linux/build_bug.h:59:21: note: expanded from macro 'BUILD_BUG'
      59 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
         |                     ^
   note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:530:2: note: expanded from macro '_compiletime_assert'
     530 |         __compiletime_assert(condition, msg, prefix, suffix)
         |         ^
   include/linux/compiler_types.h:523:4: note: expanded from macro '__compiletime_assert'
     523 |                         prefix ## suffix();                             \
         |                         ^
   <scratch space>:50:1: note: expanded from here
      50 | __compiletime_assert_603
         | ^
   2 warnings and 1 error generated.


vim +226 mm/damon/paddr.c

   200	
   201	static bool damos_pa_filter_match(struct damos_filter *filter,
   202			struct folio *folio)
   203	{
   204		bool matched = false;
   205		struct mem_cgroup *memcg;
   206	
   207		switch (filter->type) {
   208		case DAMOS_FILTER_TYPE_ANON:
   209			matched = folio_test_anon(folio);
   210			break;
   211		case DAMOS_FILTER_TYPE_MEMCG:
   212			rcu_read_lock();
   213			memcg = folio_memcg_check(folio);
   214			if (!memcg)
   215				matched = false;
   216			else
   217				matched = filter->memcg_id == mem_cgroup_id(memcg);
   218			rcu_read_unlock();
   219			break;
   220		case DAMOS_FILTER_TYPE_YOUNG:
   221			matched = damon_folio_young(folio);
   222			if (matched)
   223				damon_folio_mkold(folio);
   224			break;
   225		case DAMOS_FILTER_TYPE_HUGEPAGE:
 > 226			matched = folio_size(folio) == HPAGE_PMD_SIZE;
   227			break;
   228		default:
   229			break;
   230		}
   231	
   232		return matched == filter->matching;
   233	}
   234	

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux