The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Xueyuan Chen <xueyuan.chen21@gmail.com>
To: usama.arif@linux.dev
Cc: xueyuan.chen21@gmail.com, akpm@linux-foundation.org,
	david@kernel.org, catalin.marinas@arm.com, will@kernel.org,
	tglx@kernel.org, mingo@redhat.com, bp@alien8.de,
	dave.hansen@linux.intel.com, x86@kernel.org, linux-mm@kvack.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, lance.yang@linux.dev,
	jannh@google.com, yang@os.amperecomputing.com, rppt@kernel.org,
	ljs@kernel.org, ziy@nvidia.com, baolin.wang@linux.alibaba.com,
	liam@infradead.org, npache@redhat.com, ryan.roberts@arm.com,
	dev.jain@arm.com, baohua@kernel.org, hpa@zytor.com,
	luto@kernel.org, peterz@infradead.org
Subject: Re: [RFC PATCH v3 1/3] mm: make persistent huge zero folio read-only
Date: Fri, 10 Jul 2026 11:03:41 +0800	[thread overview]
Message-ID: <20260710030341.8527-1-xueyuan.chen21@gmail.com> (raw)
In-Reply-To: <20260707131714.3266156-1-usama.arif@linux.dev>


On Tue, Jul 07, 2026 at 06:17:12AM -0700, Usama Arif wrote:

Hi Usama,

Sorry for the late reply.

[...]

>Can this really skip the TLB flush here?  This runs from a
>subsys_initcall, after smp_init() and after the folio was allocated and
>zeroed through the writable direct map.  The noflush helper updates the
>direct-map PTEs but does not invalidate stale writable kernel TLB entries.
>
>I think we need a TLB flush here?

I checked the code, and you are right. This runs after smp_init(), and
the folio has already been allocated and zeroed through the writable
direct map before changing the direct-map PTEs. So skipping the TLB
flush is not safe.

I will fix this in the next version.

Thanks for catching this.

Thanks,
Xueyuan

  reply	other threads:[~2026-07-10  3:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-06 13:04 [RFC PATCH v3 0/3] make persistent huge zero folio read-only Xueyuan Chen
2026-07-06 13:04 ` [RFC PATCH v3 1/3] mm: " Xueyuan Chen
2026-07-07 13:17   ` Usama Arif
2026-07-10  3:03     ` Xueyuan Chen [this message]
2026-07-06 13:04 ` [RFC PATCH v3 2/3] arm64/mm: add set_direct_map_ro_noflush() Xueyuan Chen
2026-07-06 13:04 ` [RFC PATCH v3 3/3] x86/mm: " Xueyuan Chen

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=20260710030341.8527-1-xueyuan.chen21@gmail.com \
    --to=xueyuan.chen21@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=david@kernel.org \
    --cc=dev.jain@arm.com \
    --cc=hpa@zytor.com \
    --cc=jannh@google.com \
    --cc=lance.yang@linux.dev \
    --cc=liam@infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=npache@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rppt@kernel.org \
    --cc=ryan.roberts@arm.com \
    --cc=tglx@kernel.org \
    --cc=usama.arif@linux.dev \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    --cc=yang@os.amperecomputing.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox