Re: [PATCH] mm: workingset: account MGLRU pages in count_shadow_nodes()

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all,org.kernel.vger.linux-kernel,org.kvack.linux-mm
Message-ID <[email protected]>
Hi Hui,

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/Hui-Zhu/mm-workingset-account-MGLRU-pages-in-count_shadow_nodes/20260824-171630
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/20260824091631.836473-1-hui.zhu%40linux.dev
patch subject: [PATCH] mm: workingset: account MGLRU pages in count_shadow_nodes()
config: parisc-randconfig-002-20260825 (https://download.01.org/0day-ci/archive/20260825/[email protected]/config)
compiler: hppa-linux-gcc (GCC) 14.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260825/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> mm/workingset.c:657:22: warning: 'count_lru_gen_pages' defined but not used [-Wunused-function]
     657 | static unsigned long count_lru_gen_pages(struct lruvec *lruvec)
         |                      ^~~~~~~~~~~~~~~~~~~


vim +/count_lru_gen_pages +657 mm/workingset.c

   650	
   651	#ifdef CONFIG_LRU_GEN
   652	/*
   653	 * The per-generation counters are eventually consistent and may go
   654	 * transiently negative while batched updates are pending, so clamp
   655	 * the sum at zero.
   656	 */
 > 657	static unsigned long count_lru_gen_pages(struct lruvec *lruvec)
   658	{
   659		struct lru_gen_folio *lrugen = &lruvec->lrugen;
   660		long nr_pages = 0;
   661		int gen, type, zone;
   662	
   663		if (!lrugen->enabled)
   664			return 0;
   665	
   666		for (gen = 0; gen < MAX_NR_GENS; gen++) {
   667			for (type = 0; type < ANON_AND_FILE; type++) {
   668				long *cnt = lrugen->nr_pages[gen][type];
   669	
   670				for (zone = 0; zone < MAX_NR_ZONES; zone++)
   671					nr_pages += READ_ONCE(cnt[zone]);
   672			}
   673		}
   674	
   675		if (nr_pages <= 0)
   676			return 0;
   677	
   678		return nr_pages;
   679	}
   680	#endif
   681	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.