[PATCH 1/8] mm: Add ptep_try_set() for lockless empty-slot installs
Tejun Heo
tj at kernel.org
Sun Jun 14 13:29:47 PDT 2026
Hello,
On Sun, Jun 14, 2026 at 10:28:02AM +0100, Will Deacon wrote:
> > +/*
> > + * Note: strictly-zero compare is narrower than pte_none(), but the gap is
> > + * harmless: a fresh kernel PTE has no software bits set.
> > + */
>
> This comment really confused me :/
>
> What is a "fresh" kernel PTE and why do you specifically call out "software
> bits" if the CAS requires all 64 bits to be 0? Why is that narrower than
> pte_none() given that pte_none() for arm64 is:
>
> #define pte_none(pte) (!pte_val(pte))
Yeah, that's complete non-sense for arm. The comment is about x86's
pte_none() excluding DIRTY and ACCESSED due to an erratum when testing none
and how that doesn't matter here. This shouldn't have been copied to arm.
I'll send a patch to remove that.
Thanks.
--
tejun
More information about the linux-arm-kernel
mailing list