tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git pending-fixes head: a06df994e3b96f0f6b97e5d2679c41f60d182bbe commit: 1ee09e54a76f75dcf5d59737d81bec1624bf4764 [301/373] mm: multi-gen LRU: use {ptep,pmdp}_clear_young_notify() config: i386-buildonly-randconfig-004-20241025 (https://download.01.org/0day-ci/archive/20241025/202410252141.djLwbAYF-lkp@xxxxxxxxx/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/20241025/202410252141.djLwbAYF-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/202410252141.djLwbAYF-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): ld: mm/vmscan.o: in function `walk_pmd_range_locked': >> mm/vmscan.c:3498: undefined reference to `pmdp_test_and_clear_young' vim +3498 mm/vmscan.c 3440 3441 static void walk_pmd_range_locked(pud_t *pud, unsigned long addr, struct vm_area_struct *vma, 3442 struct mm_walk *args, unsigned long *bitmap, unsigned long *first) 3443 { 3444 int i; 3445 pmd_t *pmd; 3446 spinlock_t *ptl; 3447 struct lru_gen_mm_walk *walk = args->private; 3448 struct mem_cgroup *memcg = lruvec_memcg(walk->lruvec); 3449 struct pglist_data *pgdat = lruvec_pgdat(walk->lruvec); 3450 DEFINE_MAX_SEQ(walk->lruvec); 3451 int old_gen, new_gen = lru_gen_from_seq(max_seq); 3452 3453 VM_WARN_ON_ONCE(pud_leaf(*pud)); 3454 3455 /* try to batch at most 1+MIN_LRU_BATCH+1 entries */ 3456 if (*first == -1) { 3457 *first = addr; 3458 bitmap_zero(bitmap, MIN_LRU_BATCH); 3459 return; 3460 } 3461 3462 i = addr == -1 ? 0 : pmd_index(addr) - pmd_index(*first); 3463 if (i && i <= MIN_LRU_BATCH) { 3464 __set_bit(i - 1, bitmap); 3465 return; 3466 } 3467 3468 pmd = pmd_offset(pud, *first); 3469 3470 ptl = pmd_lockptr(args->mm, pmd); 3471 if (!spin_trylock(ptl)) 3472 goto done; 3473 3474 arch_enter_lazy_mmu_mode(); 3475 3476 do { 3477 unsigned long pfn; 3478 struct folio *folio; 3479 3480 /* don't round down the first address */ 3481 addr = i ? (*first & PMD_MASK) + i * PMD_SIZE : *first; 3482 3483 if (pmd_present(pmd[i]) && !pmd_trans_huge(pmd[i])) { 3484 if (!walk->force_scan && should_clear_pmd_young() && 3485 !mm_has_notifiers(args->mm)) 3486 pmdp_test_and_clear_young(vma, addr, pmd + i); 3487 goto next; 3488 } 3489 3490 pfn = get_pmd_pfn(pmd[i], vma, addr, pgdat); 3491 if (pfn == -1) 3492 goto next; 3493 3494 folio = get_pfn_folio(pfn, memcg, pgdat, walk->can_swap); 3495 if (!folio) 3496 goto next; 3497 > 3498 if (!pmdp_clear_young_notify(vma, addr, pmd + i)) 3499 goto next; 3500 3501 walk->mm_stats[MM_LEAF_YOUNG]++; 3502 3503 if (pmd_dirty(pmd[i]) && !folio_test_dirty(folio) && 3504 !(folio_test_anon(folio) && folio_test_swapbacked(folio) && 3505 !folio_test_swapcache(folio))) 3506 folio_mark_dirty(folio); 3507 3508 old_gen = folio_update_gen(folio, new_gen); 3509 if (old_gen >= 0 && old_gen != new_gen) 3510 update_batch_size(walk, folio, old_gen, new_gen); 3511 next: 3512 i = i > MIN_LRU_BATCH ? 0 : find_next_bit(bitmap, MIN_LRU_BATCH, i) + 1; 3513 } while (i <= MIN_LRU_BATCH); 3514 3515 arch_leave_lazy_mmu_mode(); 3516 spin_unlock(ptl); 3517 done: 3518 *first = -1; 3519 } 3520 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki