lkml.org 
[lkml]   [2023]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] arm64/mm: Set only the PTE_DIRTY bit while preserving the HW dirty state
On Thu, Jul 13, 2023 at 12:45:18PM +0530, Anshuman Khandual wrote:
> pte_mkdirty() creates dirty states both in SW and HW bits, which is really
> not required, either in pte_wrprotect() or pte_modify() for preserving the
> HW dirty state. Because pte_mkdirty() sets PTE_DIRTY and clears PTE_RDONLY
> as pte_write() always evaluates to be true - otherwise pte_hw_dirty() will
> not test out in the first place. Clearing PTE_RDONLY again is not required
> here because the pte is already in pte_hw_dirty() but might soon loose its
> dirty state thus requiring preservation in SW dirty bit i.e PTE_DIRTY.
>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

\
 
 \ /
  Last update: 2023-07-21 20:24    [W:0.054 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site