linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "JP Kobryn (Meta)" <jp.kobryn@linux.dev>,
	linux-mm@kvack.org, mst@redhat.com, mhocko@suse.com,
	vbabka@suse.cz
Cc: oe-kbuild-all@lists.linux.dev, apopple@nvidia.com,
	akpm@linux-foundation.org, axelrasmussen@google.com,
	byungchul@sk.com, cgroups@vger.kernel.org, david@kernel.org,
	eperezma@redhat.com, gourry@gourry.net, jasowang@redhat.com,
	hannes@cmpxchg.org, joshua.hahnjy@gmail.com,
	Liam.Howlett@oracle.com, linux-kernel@vger.kernel.org,
	lorenzo.stoakes@oracle.com, matthew.brost@intel.com,
	rppt@kernel.org, muchun.song@linux.dev,
	zhengqi.arch@bytedance.com, rakie.kim@sk.com,
	roman.gushchin@linux.dev, shakeel.butt@linux.dev,
	surenb@google.com, virtualization@lists.linux.dev,
	weixugc@google.com, xuanzhuo@linux.alibaba.com,
	ying.huang@linux.alibaba.com
Subject: Re: [PATCH v3] mm: move pgscan, pgsteal, pgrefill to node stats
Date: Thu, 19 Feb 2026 14:10:08 +0100	[thread overview]
Message-ID: <202602191417.23zH3uja-lkp@intel.com> (raw)
In-Reply-To: <20260218222652.108411-1-jp.kobryn@linux.dev>

Hi JP,

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/JP-Kobryn-Meta/mm-move-pgscan-pgsteal-pgrefill-to-node-stats/20260219-063016
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/20260218222652.108411-1-jp.kobryn%40linux.dev
patch subject: [PATCH v3] mm: move pgscan, pgsteal, pgrefill to node stats
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20260219/202602191417.23zH3uja-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260219/202602191417.23zH3uja-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/oe-kbuild-all/202602191417.23zH3uja-lkp@intel.com/

All warnings (new ones prefixed by >>):

   mm/vmscan.c: In function 'scan_folios':
>> mm/vmscan.c:4542:28: warning: unused variable 'memcg' [-Wunused-variable]
    4542 |         struct mem_cgroup *memcg = lruvec_memcg(lruvec);
         |                            ^~~~~


vim +/memcg +4542 mm/vmscan.c

ac35a490237446 Yu Zhao        2022-09-18  4527  
af827e0904899f Koichiro Den   2025-05-31  4528  static int scan_folios(unsigned long nr_to_scan, struct lruvec *lruvec,
af827e0904899f Koichiro Den   2025-05-31  4529  		       struct scan_control *sc, int type, int tier,
af827e0904899f Koichiro Den   2025-05-31  4530  		       struct list_head *list)
ac35a490237446 Yu Zhao        2022-09-18  4531  {
669281ee7ef731 Kalesh Singh   2023-08-01  4532  	int i;
669281ee7ef731 Kalesh Singh   2023-08-01  4533  	int gen;
b0e9e710c6bb5a JP Kobryn      2026-02-18  4534  	enum node_stat_item item;
ac35a490237446 Yu Zhao        2022-09-18  4535  	int sorted = 0;
ac35a490237446 Yu Zhao        2022-09-18  4536  	int scanned = 0;
ac35a490237446 Yu Zhao        2022-09-18  4537  	int isolated = 0;
8c2214fc9a470a Jaewon Kim     2023-10-03  4538  	int skipped = 0;
49d921b471c513 Chen Ridong    2025-12-04  4539  	int scan_batch = min(nr_to_scan, MAX_LRU_BATCH);
49d921b471c513 Chen Ridong    2025-12-04  4540  	int remaining = scan_batch;
391655fe08d1f9 Yu Zhao        2022-12-21  4541  	struct lru_gen_folio *lrugen = &lruvec->lrugen;
ac35a490237446 Yu Zhao        2022-09-18 @4542  	struct mem_cgroup *memcg = lruvec_memcg(lruvec);
ac35a490237446 Yu Zhao        2022-09-18  4543  
ac35a490237446 Yu Zhao        2022-09-18  4544  	VM_WARN_ON_ONCE(!list_empty(list));
ac35a490237446 Yu Zhao        2022-09-18  4545  
ac35a490237446 Yu Zhao        2022-09-18  4546  	if (get_nr_gens(lruvec, type) == MIN_NR_GENS)
ac35a490237446 Yu Zhao        2022-09-18  4547  		return 0;
ac35a490237446 Yu Zhao        2022-09-18  4548  
ac35a490237446 Yu Zhao        2022-09-18  4549  	gen = lru_gen_from_seq(lrugen->min_seq[type]);
ac35a490237446 Yu Zhao        2022-09-18  4550  
669281ee7ef731 Kalesh Singh   2023-08-01  4551  	for (i = MAX_NR_ZONES; i > 0; i--) {
ac35a490237446 Yu Zhao        2022-09-18  4552  		LIST_HEAD(moved);
8c2214fc9a470a Jaewon Kim     2023-10-03  4553  		int skipped_zone = 0;
669281ee7ef731 Kalesh Singh   2023-08-01  4554  		int zone = (sc->reclaim_idx + i) % MAX_NR_ZONES;
6df1b2212950aa Yu Zhao        2022-12-21  4555  		struct list_head *head = &lrugen->folios[gen][type][zone];
ac35a490237446 Yu Zhao        2022-09-18  4556  
ac35a490237446 Yu Zhao        2022-09-18  4557  		while (!list_empty(head)) {
ac35a490237446 Yu Zhao        2022-09-18  4558  			struct folio *folio = lru_to_folio(head);
ac35a490237446 Yu Zhao        2022-09-18  4559  			int delta = folio_nr_pages(folio);
ac35a490237446 Yu Zhao        2022-09-18  4560  
ac35a490237446 Yu Zhao        2022-09-18  4561  			VM_WARN_ON_ONCE_FOLIO(folio_test_unevictable(folio), folio);
ac35a490237446 Yu Zhao        2022-09-18  4562  			VM_WARN_ON_ONCE_FOLIO(folio_test_active(folio), folio);
ac35a490237446 Yu Zhao        2022-09-18  4563  			VM_WARN_ON_ONCE_FOLIO(folio_is_file_lru(folio) != type, folio);
ac35a490237446 Yu Zhao        2022-09-18  4564  			VM_WARN_ON_ONCE_FOLIO(folio_zonenum(folio) != zone, folio);
ac35a490237446 Yu Zhao        2022-09-18  4565  
ac35a490237446 Yu Zhao        2022-09-18  4566  			scanned += delta;
ac35a490237446 Yu Zhao        2022-09-18  4567  
669281ee7ef731 Kalesh Singh   2023-08-01  4568  			if (sort_folio(lruvec, folio, sc, tier))
ac35a490237446 Yu Zhao        2022-09-18  4569  				sorted += delta;
ac35a490237446 Yu Zhao        2022-09-18  4570  			else if (isolate_folio(lruvec, folio, sc)) {
ac35a490237446 Yu Zhao        2022-09-18  4571  				list_add(&folio->lru, list);
ac35a490237446 Yu Zhao        2022-09-18  4572  				isolated += delta;
ac35a490237446 Yu Zhao        2022-09-18  4573  			} else {
ac35a490237446 Yu Zhao        2022-09-18  4574  				list_move(&folio->lru, &moved);
8c2214fc9a470a Jaewon Kim     2023-10-03  4575  				skipped_zone += delta;
ac35a490237446 Yu Zhao        2022-09-18  4576  			}
ac35a490237446 Yu Zhao        2022-09-18  4577  
8c2214fc9a470a Jaewon Kim     2023-10-03  4578  			if (!--remaining || max(isolated, skipped_zone) >= MIN_LRU_BATCH)
ac35a490237446 Yu Zhao        2022-09-18  4579  				break;
ac35a490237446 Yu Zhao        2022-09-18  4580  		}
ac35a490237446 Yu Zhao        2022-09-18  4581  
8c2214fc9a470a Jaewon Kim     2023-10-03  4582  		if (skipped_zone) {
ac35a490237446 Yu Zhao        2022-09-18  4583  			list_splice(&moved, head);
8c2214fc9a470a Jaewon Kim     2023-10-03  4584  			__count_zid_vm_events(PGSCAN_SKIP, zone, skipped_zone);
8c2214fc9a470a Jaewon Kim     2023-10-03  4585  			skipped += skipped_zone;
ac35a490237446 Yu Zhao        2022-09-18  4586  		}
ac35a490237446 Yu Zhao        2022-09-18  4587  
ac35a490237446 Yu Zhao        2022-09-18  4588  		if (!remaining || isolated >= MIN_LRU_BATCH)
ac35a490237446 Yu Zhao        2022-09-18  4589  			break;
ac35a490237446 Yu Zhao        2022-09-18  4590  	}
ac35a490237446 Yu Zhao        2022-09-18  4591  
e452872b40e3f1 Hao Jia        2025-03-18  4592  	item = PGSCAN_KSWAPD + reclaimer_offset(sc);
b0e9e710c6bb5a JP Kobryn      2026-02-18  4593  	mod_lruvec_state(lruvec, item, isolated);
b0e9e710c6bb5a JP Kobryn      2026-02-18  4594  	mod_lruvec_state(lruvec, PGREFILL, sorted);
b0e9e710c6bb5a JP Kobryn      2026-02-18  4595  	mod_lruvec_state(lruvec, PGSCAN_ANON + type, isolated);
49d921b471c513 Chen Ridong    2025-12-04  4596  	trace_mm_vmscan_lru_isolate(sc->reclaim_idx, sc->order, scan_batch,
8c2214fc9a470a Jaewon Kim     2023-10-03  4597  				scanned, skipped, isolated,
8c2214fc9a470a Jaewon Kim     2023-10-03  4598  				type ? LRU_INACTIVE_FILE : LRU_INACTIVE_ANON);
1bc542c6a0d144 Zeng Jingxiang 2024-10-26  4599  	if (type == LRU_GEN_FILE)
1bc542c6a0d144 Zeng Jingxiang 2024-10-26  4600  		sc->nr.file_taken += isolated;
ac35a490237446 Yu Zhao        2022-09-18  4601  	/*
e9d4e1ee788097 Yu Zhao        2022-12-21  4602  	 * There might not be eligible folios due to reclaim_idx. Check the
e9d4e1ee788097 Yu Zhao        2022-12-21  4603  	 * remaining to prevent livelock if it's not making progress.
ac35a490237446 Yu Zhao        2022-09-18  4604  	 */
ac35a490237446 Yu Zhao        2022-09-18  4605  	return isolated || !remaining ? scanned : 0;
ac35a490237446 Yu Zhao        2022-09-18  4606  }
ac35a490237446 Yu Zhao        2022-09-18  4607  

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


      parent reply	other threads:[~2026-02-19 13:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-18 22:26 JP Kobryn (Meta)
2026-02-19  8:57 ` Vlastimil Babka (SUSE)
2026-02-19 10:02 ` kernel test robot
2026-02-19 13:10 ` kernel test robot [this message]

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=202602191417.23zH3uja-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=apopple@nvidia.com \
    --cc=axelrasmussen@google.com \
    --cc=byungchul@sk.com \
    --cc=cgroups@vger.kernel.org \
    --cc=david@kernel.org \
    --cc=eperezma@redhat.com \
    --cc=gourry@gourry.net \
    --cc=hannes@cmpxchg.org \
    --cc=jasowang@redhat.com \
    --cc=joshua.hahnjy@gmail.com \
    --cc=jp.kobryn@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=matthew.brost@intel.com \
    --cc=mhocko@suse.com \
    --cc=mst@redhat.com \
    --cc=muchun.song@linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rakie.kim@sk.com \
    --cc=roman.gushchin@linux.dev \
    --cc=rppt@kernel.org \
    --cc=shakeel.butt@linux.dev \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    --cc=virtualization@lists.linux.dev \
    --cc=weixugc@google.com \
    --cc=xuanzhuo@linux.alibaba.com \
    --cc=ying.huang@linux.alibaba.com \
    --cc=zhengqi.arch@bytedance.com \
    /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