[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6f448506-677f-4e0c-aa9c-d5da061e57ee@redhat.com>
Date: Tue, 14 Oct 2025 16:32:04 +0200
From: David Hildenbrand <david@...hat.com>
To: Lance Yang <lance.yang@...ux.dev>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Cc: akpm@...ux-foundation.org, Liam.Howlett@...cle.com, baohua@...nel.org,
baolin.wang@...ux.alibaba.com, dev.jain@....com, hughd@...gle.com,
ioworker0@...il.com, kirill@...temov.name, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, mpenttil@...hat.com, npache@...hat.com,
ryan.roberts@....com, ziy@...dia.com, richard.weiyang@...il.com
Subject: Re: [PATCH mm-new v3 1/1] mm/khugepaged: abort collapse scan on
non-swap entries
> static inline int pte_protnone(pte_t pte)
> {
> return (pte_flags(pte) & (_PAGE_PROTNONE | _PAGE_PRESENT))
> == _PAGE_PROTNONE;
> }
>
> static inline int pte_present(pte_t a)
> {
> return pte_flags(a) & (_PAGE_PRESENT | _PAGE_PROTNONE);
> }
> ```
>
> On x86, pte_present() returns true for a protnone pte. And I'd assume
> other archs behave similarly ...
Applies to all architecture. prot-none entries must be present,
otherwise we'd have a lot of other issues :)
--
Cheers
David / dhildenb
Powered by blists - more mailing lists