All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [android-common:android15-6.6 0/1] mm/vmscan.c:2623:15: warning: no previous prototype for function 'shrink_inactive_list'
Date: Tue, 08 Sep 2026 12:58:54 +0800	[thread overview]
Message-ID: <202609081249.8Kx67Wra-lkp@intel.com> (raw)

Hi xiaofeng,

FYI, the error/warning still remains.

tree:   https://android.googlesource.com/kernel/common android15-6.6
head:   7c4d9544b5a66846a8522efb9935c50a56b8f1ec
commit: 8cb9b0ef9dbf1ee46c01906f91af8e35c12527d1 [0/1] ANDROID: GKI: add vendor hook to reclaim cold pagecache  generated by bufferio in advance.
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20260908/202609081249.8Kx67Wra-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260908/202609081249.8Kx67Wra-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/202609081249.8Kx67Wra-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from <built-in>:3:
   In file included from include/linux/compiler_types.h:150:
   include/linux/compiler-clang.h:33:9: warning: '__SANITIZE_ADDRESS__' macro redefined [-Wmacro-redefined]
      33 | #define __SANITIZE_ADDRESS__
         |         ^
   <built-in>:353:9: note: previous definition is here
     353 | #define __SANITIZE_ADDRESS__ 1
         |         ^
   In file included from mm/vmscan.c:15:
   In file included from include/linux/mm.h:2238:
   include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     508 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     509 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     515 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     516 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     522 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     527 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     528 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     536 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     537 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   In file included from mm/vmscan.c:30:
   include/linux/mm_inline.h:49:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
      49 |         __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
         |                                    ~~~~~~~~~~~ ^ ~~~
   include/linux/mm_inline.h:51:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
      51 |                                 NR_ZONE_LRU_BASE + lru, nr_pages);
         |                                 ~~~~~~~~~~~~~~~~ ^ ~~~
   mm/vmscan.c:678:51: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     678 |                         size += zone_page_state(zone, NR_ZONE_LRU_BASE + lru);
         |                                                       ~~~~~~~~~~~~~~~~ ^ ~~~
   mm/vmscan.c:1043:15: warning: no previous prototype for function 'shrink_slab' [-Wmissing-prototypes]
    1043 | unsigned long shrink_slab(gfp_t gfp_mask, int nid,
         |               ^
   mm/vmscan.c:1043:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
    1043 | unsigned long shrink_slab(gfp_t gfp_mask, int nid,
         | ^
         | static 
   mm/vmscan.c:2442:4: warning: arithmetic between different enumeration types ('enum vm_event_item' and 'enum zone_type') [-Wenum-enum-conversion]
    2442 |                         __count_zid_vm_events(PGSCAN_SKIP, zid, nr_skipped[zid]);
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:135:34: note: expanded from macro '__count_zid_vm_events'
     135 |         __count_vm_events(item##_NORMAL - ZONE_NORMAL + zid, delta)
         |                           ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
>> mm/vmscan.c:2623:15: warning: no previous prototype for function 'shrink_inactive_list' [-Wmissing-prototypes]
    2623 | unsigned long shrink_inactive_list(unsigned long nr_to_scan,
         |               ^
   mm/vmscan.c:2623:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
    2623 | unsigned long shrink_inactive_list(unsigned long nr_to_scan,
         | ^
         | static 
   mm/vmscan.c:2971:51: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
    2971 |         inactive = lruvec_page_state(lruvec, NR_LRU_BASE + inactive_lru);
         |                                              ~~~~~~~~~~~ ^ ~~~~~~~~~~~~
   mm/vmscan.c:2972:49: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
    2972 |         active = lruvec_page_state(lruvec, NR_LRU_BASE + active_lru);
         |                                            ~~~~~~~~~~~ ^ ~~~~~~~~~~
   mm/vmscan.c:5175:4: warning: arithmetic between different enumeration types ('enum vm_event_item' and 'enum zone_type') [-Wenum-enum-conversion]
    5175 |                         __count_zid_vm_events(PGSCAN_SKIP, zone, skipped_zone);
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:135:34: note: expanded from macro '__count_zid_vm_events'
     135 |         __count_vm_events(item##_NORMAL - ZONE_NORMAL + zid, delta)
         |                           ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
   mm/vmscan.c:7018:3: warning: arithmetic between different enumeration types ('enum vm_event_item' and 'enum zone_type') [-Wenum-enum-conversion]
    7018 |                 __count_zid_vm_events(ALLOCSTALL, sc->reclaim_idx, 1);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:135:34: note: expanded from macro '__count_zid_vm_events'
     135 |         __count_vm_events(item##_NORMAL - ZONE_NORMAL + zid, delta)
         |                           ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
   16 warnings generated.


vim +/shrink_inactive_list +2623 mm/vmscan.c

  2618	
  2619	/*
  2620	 * shrink_inactive_list() is a helper for shrink_node().  It returns the number
  2621	 * of reclaimed pages
  2622	 */
> 2623	unsigned long shrink_inactive_list(unsigned long nr_to_scan,
  2624			struct lruvec *lruvec, struct scan_control *sc,
  2625			enum lru_list lru)
  2626	{
  2627		LIST_HEAD(folio_list);
  2628		unsigned long nr_scanned;
  2629		unsigned int nr_reclaimed = 0;
  2630		unsigned long nr_taken;
  2631		struct reclaim_stat stat;
  2632		bool file = is_file_lru(lru);
  2633		enum vm_event_item item;
  2634		struct pglist_data *pgdat = lruvec_pgdat(lruvec);
  2635		bool stalled = false;
  2636	
  2637		while (unlikely(too_many_isolated(pgdat, file, sc))) {
  2638			if (stalled)
  2639				return 0;
  2640	
  2641			/* wait a bit for the reclaimer. */
  2642			stalled = true;
  2643			reclaim_throttle(pgdat, VMSCAN_THROTTLE_ISOLATED);
  2644	
  2645			/* We are about to die and free our memory. Return now. */
  2646			if (fatal_signal_pending(current))
  2647				return SWAP_CLUSTER_MAX;
  2648		}
  2649	
  2650		lru_add_drain();
  2651	
  2652		spin_lock_irq(&lruvec->lru_lock);
  2653	
  2654		nr_taken = isolate_lru_folios(nr_to_scan, lruvec, &folio_list,
  2655					     &nr_scanned, sc, lru);
  2656	
  2657		__mod_node_page_state(pgdat, NR_ISOLATED_ANON + file, nr_taken);
  2658		item = PGSCAN_KSWAPD + reclaimer_offset();
  2659		if (!cgroup_reclaim(sc))
  2660			__count_vm_events(item, nr_scanned);
  2661		__count_memcg_events(lruvec_memcg(lruvec), item, nr_scanned);
  2662		__count_vm_events(PGSCAN_ANON + file, nr_scanned);
  2663	
  2664		spin_unlock_irq(&lruvec->lru_lock);
  2665	
  2666		if (nr_taken == 0)
  2667			return 0;
  2668	
  2669		nr_reclaimed = shrink_folio_list(&folio_list, pgdat, sc, &stat, false);
  2670		trace_android_vh_handle_trylock_failed_folio(&folio_list);
  2671	
  2672		spin_lock_irq(&lruvec->lru_lock);
  2673		move_folios_to_lru(lruvec, &folio_list);
  2674	
  2675		__mod_node_page_state(pgdat, NR_ISOLATED_ANON + file, -nr_taken);
  2676		item = PGSTEAL_KSWAPD + reclaimer_offset();
  2677		if (!cgroup_reclaim(sc))
  2678			__count_vm_events(item, nr_reclaimed);
  2679		__count_memcg_events(lruvec_memcg(lruvec), item, nr_reclaimed);
  2680		__count_vm_events(PGSTEAL_ANON + file, nr_reclaimed);
  2681		spin_unlock_irq(&lruvec->lru_lock);
  2682	
  2683		lru_note_cost(lruvec, file, stat.nr_pageout, nr_scanned - nr_reclaimed);
  2684		mem_cgroup_uncharge_list(&folio_list);
  2685		free_unref_page_list(&folio_list);
  2686	
  2687		/*
  2688		 * If dirty folios are scanned that are not queued for IO, it
  2689		 * implies that flushers are not doing their job. This can
  2690		 * happen when memory pressure pushes dirty folios to the end of
  2691		 * the LRU before the dirty limits are breached and the dirty
  2692		 * data has expired. It can also happen when the proportion of
  2693		 * dirty folios grows not through writes but through memory
  2694		 * pressure reclaiming all the clean cache. And in some cases,
  2695		 * the flushers simply cannot keep up with the allocation
  2696		 * rate. Nudge the flusher threads in case they are asleep.
  2697		 */
  2698		if (stat.nr_unqueued_dirty == nr_taken) {
  2699			wakeup_flusher_threads(WB_REASON_VMSCAN);
  2700			/*
  2701			 * For cgroupv1 dirty throttling is achieved by waking up
  2702			 * the kernel flusher here and later waiting on folios
  2703			 * which are in writeback to finish (see shrink_folio_list()).
  2704			 *
  2705			 * Flusher may not be able to issue writeback quickly
  2706			 * enough for cgroupv1 writeback throttling to work
  2707			 * on a large system.
  2708			 */
  2709			if (!writeback_throttling_sane(sc))
  2710				reclaim_throttle(pgdat, VMSCAN_THROTTLE_WRITEBACK);
  2711		}
  2712	
  2713		sc->nr.dirty += stat.nr_dirty;
  2714		sc->nr.congested += stat.nr_congested;
  2715		sc->nr.unqueued_dirty += stat.nr_unqueued_dirty;
  2716		sc->nr.writeback += stat.nr_writeback;
  2717		sc->nr.immediate += stat.nr_immediate;
  2718		sc->nr.taken += nr_taken;
  2719		if (file)
  2720			sc->nr.file_taken += nr_taken;
  2721	
  2722		trace_mm_vmscan_lru_shrink_inactive(pgdat->node_id,
  2723				nr_scanned, nr_reclaimed, &stat, sc->priority, file);
  2724		return nr_reclaimed;
  2725	}
  2726	EXPORT_SYMBOL(shrink_inactive_list);
  2727	

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

                 reply	other threads:[~2026-09-08  4:59 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=202609081249.8Kx67Wra-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cros-kernel-buildreports@googlegroups.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.