[PATCH -v3 1/2] mm: add spurious fault fixing support for huge pmd
David Hildenbrand
david at redhat.com
Fri Oct 24 08:57:23 PDT 2025
On 23.10.25 03:35, Huang Ying wrote:
> The page faults may be spurious because of the racy access to the page
> table. For example, a non-populated virtual page is accessed on 2
> CPUs simultaneously, thus the page faults are triggered on both CPUs.
> However, it's possible that one CPU (say CPU A) cannot find the reason
> for the page fault if the other CPU (say CPU B) has changed the page
> table before the PTE is checked on CPU A. Most of the time, the
> spurious page faults can be ignored safely. However, if the page
> fault is for the write access, it's possible that a stale read-only
> TLB entry exists in the local CPU and needs to be flushed on some
> architectures. This is called the spurious page fault fixing.
>
> In the current kernel, there is spurious fault fixing support for pte,
> but not for huge pmd because no architectures need it. But in the
> next patch in the series, we will change the write protection fault
> handling logic on arm64, so that some stale huge pmd entries may
> remain in the TLB. These entries need to be flushed via the huge pmd
> spurious fault fixing mechanism.
>
> Signed-off-by: Huang Ying <ying.huang at linux.alibaba.com>
> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Cc: Will Deacon <will at kernel.org>
> Cc: Andrew Morton <akpm at linux-foundation.org>
> Cc: David Hildenbrand <david at redhat.com>
> Cc: Lorenzo Stoakes <lorenzo.stoakes at oracle.com>
> Cc: Vlastimil Babka <vbabka at suse.cz>
> Cc: Zi Yan <ziy at nvidia.com>
> Cc: Baolin Wang <baolin.wang at linux.alibaba.com>
> Cc: Ryan Roberts <ryan.roberts at arm.com>
> Cc: Yang Shi <yang at os.amperecomputing.com>
> Cc: "Christoph Lameter (Ampere)" <cl at gentwo.org>
> Cc: Dev Jain <dev.jain at arm.com>
> Cc: Barry Song <baohua at kernel.org>
> Cc: Anshuman Khandual <anshuman.khandual at arm.com>
> Cc: Kefeng Wang <wangkefeng.wang at huawei.com>
> Cc: Kevin Brodsky <kevin.brodsky at arm.com>
> Cc: Yin Fengwei <fengwei_yin at linux.alibaba.com>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-kernel at vger.kernel.org
> Cc: linux-mm at kvack.org
> ---
Acked-by: David Hildenbrand <david at redhat.com>
--
Cheers
David / dhildenb
More information about the linux-arm-kernel
mailing list