Hey Baolin, [...] @@ -4727,9 +4725,11 @@ vm_fault_t finish_fault(struct vm_fault *vmf) [...] The mm counters have been moved from updating out of set_pte_range(), so we we may need to rebase against Kefeng's patch[1]. + int type = is_cow ? MM_ANONPAGES : mm_counter_file(folio); set_pte_range(vmf, folio, &folio->page, nr_pages, addr); + add_mm_counter(vma->vm_mm, type, nr_pages); [...] [1] https://lore.kernel.org/all/20240412064751.119015-1-wangkefeng.wang@xxxxxxxxxx/T/#me2827c26ff453c0fa86f2af9f68f245978b08774 Thanks, Lance