All of lore.kernel.org
 help / color / mirror / Atom feed
* [chrome-os:chromeos-6.6 3/5] mm/vmscan.c:1537:45: error: 'ISOLATED_FOLIO_MIN' undeclared
@ 2024-10-12 12:06 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-12 12:06 UTC (permalink / raw)
  To: cros-kernel-buildreports; +Cc: oe-kbuild-all

tree:   https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-6.6
head:   dc34775004416cce5b19d0d38d0b0988891cb80b
commit: bc4946831df47ecd08b164f726d5fd5846be326e [3/5] CHROMIUM: mm/mglru: Improve isolated page access bit harvesting
config: x86_64-rhel-8.3 (https://download.01.org/0day-ci/archive/20241012/202410122013.EnLPIEO0-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241012/202410122013.EnLPIEO0-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/202410122013.EnLPIEO0-lkp@intel.com/

All errors (new ones prefixed by >>):

   mm/vmscan.c: In function 'folio_check_references':
   mm/vmscan.c:1535:27: error: implicit declaration of function 'lru_raw_gen_from_flags' [-Werror=implicit-function-declaration]
    1535 |                 int gen = lru_raw_gen_from_flags(READ_ONCE(folio->flags));
         |                           ^~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/init.h:5,
                    from include/linux/printk.h:6,
                    from include/asm-generic/bug.h:22,
                    from arch/x86/include/asm/bug.h:87,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/mm.h:6,
                    from mm/vmscan.c:15:
>> mm/vmscan.c:1537:45: error: 'ISOLATED_FOLIO_MIN' undeclared (first use in this function)
    1537 |                 VM_WARN_ON_ONCE_FOLIO(gen < ISOLATED_FOLIO_MIN, folio);
         |                                             ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:30:63: note: in definition of macro 'BUILD_BUG_ON_INVALID'
      30 | #define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
         |                                                               ^
   mm/vmscan.c:1537:17: note: in expansion of macro 'VM_WARN_ON_ONCE_FOLIO'
    1537 |                 VM_WARN_ON_ONCE_FOLIO(gen < ISOLATED_FOLIO_MIN, folio);
         |                 ^~~~~~~~~~~~~~~~~~~~~
   mm/vmscan.c:1537:45: note: each undeclared identifier is reported only once for each function it appears in
    1537 |                 VM_WARN_ON_ONCE_FOLIO(gen < ISOLATED_FOLIO_MIN, folio);
         |                                             ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:30:63: note: in definition of macro 'BUILD_BUG_ON_INVALID'
      30 | #define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
         |                                                               ^
   mm/vmscan.c:1537:17: note: in expansion of macro 'VM_WARN_ON_ONCE_FOLIO'
    1537 |                 VM_WARN_ON_ONCE_FOLIO(gen < ISOLATED_FOLIO_MIN, folio);
         |                 ^~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/ISOLATED_FOLIO_MIN +1537 mm/vmscan.c

  1523	
  1524	static enum folio_references folio_check_references(struct folio *folio,
  1525							  struct scan_control *sc)
  1526	{
  1527		int referenced_ptes, referenced_folio;
  1528		unsigned long vm_flags;
  1529	
  1530		referenced_ptes = folio_referenced(folio, 1, sc->target_mem_cgroup,
  1531						   &vm_flags);
  1532		referenced_folio = folio_test_clear_referenced(folio);
  1533	
  1534		if (lru_gen_enabled()) {
  1535			int gen = lru_raw_gen_from_flags(READ_ONCE(folio->flags));
  1536	
> 1537			VM_WARN_ON_ONCE_FOLIO(gen < ISOLATED_FOLIO_MIN, folio);
  1538	
  1539			if (gen > ISOLATED_FOLIO_MIN)
  1540				referenced_ptes += gen - ISOLATED_FOLIO_MIN;
  1541		}
  1542	
  1543		/*
  1544		 * The supposedly reclaimable folio was found to be in a VM_LOCKED vma.
  1545		 * Let the folio, now marked Mlocked, be moved to the unevictable list.
  1546		 */
  1547		if (vm_flags & VM_LOCKED)
  1548			return FOLIOREF_ACTIVATE;
  1549	
  1550		/* rmap lock contention: rotate */
  1551		if (referenced_ptes == -1)
  1552			return FOLIOREF_KEEP;
  1553	
  1554		if (referenced_ptes) {
  1555			/*
  1556			 * All mapped folios start out with page table
  1557			 * references from the instantiating fault, so we need
  1558			 * to look twice if a mapped file/anon folio is used more
  1559			 * than once.
  1560			 *
  1561			 * Mark it and spare it for another trip around the
  1562			 * inactive list.  Another page table reference will
  1563			 * lead to its activation.
  1564			 *
  1565			 * Note: the mark is set for activated folios as well
  1566			 * so that recently deactivated but used folios are
  1567			 * quickly recovered.
  1568			 */
  1569			folio_set_referenced(folio);
  1570	
  1571			if (referenced_folio || referenced_ptes > 1)
  1572				return FOLIOREF_ACTIVATE;
  1573	
  1574			/*
  1575			 * Activate file-backed executable folios after first usage.
  1576			 */
  1577			if ((vm_flags & VM_EXEC) && folio_is_file_lru(folio))
  1578				return FOLIOREF_ACTIVATE;
  1579	
  1580			return FOLIOREF_KEEP;
  1581		}
  1582	
  1583		/* Reclaim if clean, defer dirty folios to writeback */
  1584		if (referenced_folio && folio_is_file_lru(folio))
  1585			return FOLIOREF_RECLAIM_CLEAN;
  1586	
  1587		return FOLIOREF_RECLAIM;
  1588	}
  1589	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-12 12:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-12 12:06 [chrome-os:chromeos-6.6 3/5] mm/vmscan.c:1537:45: error: 'ISOLATED_FOLIO_MIN' undeclared kernel test robot

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.