[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z_iJF2ehg9d-azoq@localhost.localdomain>
Date: Fri, 11 Apr 2025 05:14:31 +0200
From: Oscar Salvador <osalvador@...e.de>
To: Baolin Wang <baolin.wang@...ux.alibaba.com>
Cc: akpm@...ux-foundation.org, willy@...radead.org, david@...hat.com,
hannes@...xchg.org, 21cnbao@...il.com, ryan.roberts@....com,
ziy@...dia.com, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: huge_memory: add folio_mark_accessed() when zapping
file THP
On Fri, Apr 11, 2025 at 09:07:16AM +0800, Baolin Wang wrote:
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index b3ade7ac5bbf..93abd1fcc4fb 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -2263,6 +2263,10 @@ int zap_huge_pmd(struct mmu_gather *tlb, struct
> vm_area_struct *vma,
> add_mm_counter(tlb->mm, mm_counter_file(folio),
> -HPAGE_PMD_NR);
>
> + /*
> + * Use flush_needed to indicate whether the PMD
> entry is present,
> + * instead of checking pmd_present() again.
> + */
> if (flush_needed && pmd_young(orig_pmd) &&
> likely(vma_has_recency(vma)))
> folio_mark_accessed(folio);
Yes, thanks, looks good to me, and I see that Andrew has already taken
it.
--
Oscar Salvador
SUSE Labs
Powered by blists - more mailing lists