[PATCH] arm64, mm: avoid always making PTE dirty in pte_mkwrite()

Catalin Marinas catalin.marinas at arm.com
Tue Oct 21 09:19:05 PDT 2025


On Wed, 15 Oct 2025 10:37:12 +0800, Huang Ying wrote:
> Current pte_mkwrite_novma() makes PTE dirty unconditionally.  This may
> mark some pages that are never written dirty wrongly.  For example,
> do_swap_page() may map the exclusive pages with writable and clean PTEs
> if the VMA is writable and the page fault is for read access.
> However, current pte_mkwrite_novma() implementation always dirties the
> PTE.  This may cause unnecessary disk writing if the pages are
> never written before being reclaimed.
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64, mm: avoid always making PTE dirty in pte_mkwrite()
      https://git.kernel.org/arm64/c/143937ca51cc

-- 
Catalin




More information about the linux-arm-kernel mailing list