All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oscar Salvador <osalvador@suse.de>
To: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: akpm@linux-foundation.org, willy@infradead.org, david@redhat.com,
	hannes@cmpxchg.org, 21cnbao@gmail.com, ryan.roberts@arm.com,
	ziy@nvidia.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: huge_memory: add folio_mark_accessed() when zapping file THP
Date: Fri, 11 Apr 2025 05:14:31 +0200	[thread overview]
Message-ID: <Z_iJF2ehg9d-azoq@localhost.localdomain> (raw)
In-Reply-To: <23fdc11d-e983-4627-89a8-79e9ecf9a45a@linux.alibaba.com>

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


      reply	other threads:[~2025-04-11  3:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-09  9:38 [PATCH] mm: huge_memory: add folio_mark_accessed() when zapping file THP Baolin Wang
2025-04-09  9:46 ` David Hildenbrand
2025-04-09  9:49   ` Baolin Wang
2025-04-09  9:53     ` David Hildenbrand
2025-04-10  8:45 ` Oscar Salvador
2025-04-11  1:07   ` Baolin Wang
2025-04-11  3:14     ` Oscar Salvador [this message]

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=Z_iJF2ehg9d-azoq@localhost.localdomain \
    --to=osalvador@suse.de \
    --cc=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=david@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ryan.roberts@arm.com \
    --cc=willy@infradead.org \
    --cc=ziy@nvidia.com \
    /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.