public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lance Yang <lance.yang@linux.dev>
To: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
	David Hildenbrand <david@redhat.com>
Cc: akpm@linux-foundation.org, Liam.Howlett@oracle.com,
	baohua@kernel.org, baolin.wang@linux.alibaba.com,
	dev.jain@arm.com, hughd@google.com, ioworker0@gmail.com,
	kirill@shutemov.name, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, mpenttil@redhat.com, npache@redhat.com,
	ryan.roberts@arm.com, ziy@nvidia.com, richard.weiyang@gmail.com
Subject: Re: [PATCH mm-new v3 1/1] mm/khugepaged: abort collapse scan on non-swap entries
Date: Tue, 14 Oct 2025 22:37:28 +0800	[thread overview]
Message-ID: <2e22cff1-fad7-45a6-bdd4-d5921d12c5e2@linux.dev> (raw)
In-Reply-To: <6f448506-677f-4e0c-aa9c-d5da061e57ee@redhat.com>



On 2025/10/14 22:32, David Hildenbrand wrote:
> 
>> 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 :)

Thanks for confirming, David! That's good to know ;p

So @Lorenzo, looks like we're good here on the protnone front. Does
that clear up your concern?


  reply	other threads:[~2025-10-14 14:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-08  3:26 [PATCH mm-new v3 1/1] mm/khugepaged: abort collapse scan on non-swap entries Lance Yang
2025-10-08  8:18 ` David Hildenbrand
2025-10-10  3:44 ` Barry Song
2025-10-10 15:21 ` Zi Yan
2025-10-10 15:34   ` Lance Yang
2025-10-10 15:35     ` Zi Yan
2025-10-14 11:08 ` Lorenzo Stoakes
2025-10-14 14:26   ` Lance Yang
2025-10-14 14:32     ` David Hildenbrand
2025-10-14 14:37       ` Lance Yang [this message]
2025-10-14 14:43         ` Lorenzo Stoakes
2025-10-14 14:39     ` Lorenzo Stoakes
2025-10-14 15:01       ` Lance Yang
2025-10-14 15:12         ` David Hildenbrand
2025-10-14 15:33           ` David Hildenbrand
2025-10-14 16:10             ` Lorenzo Stoakes
2025-10-14 15:41           ` Lorenzo Stoakes
2025-10-14 15:48             ` David Hildenbrand
2025-10-14 15:57               ` Lorenzo Stoakes
2025-10-14 15:11       ` David Hildenbrand
2025-10-14 15:52         ` Lorenzo Stoakes
2025-10-14 16:09           ` Lance Yang
2025-10-14 16:27             ` Lorenzo Stoakes
2025-10-15  1:52               ` Lance Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2e22cff1-fad7-45a6-bdd4-d5921d12c5e2@linux.dev \
    --to=lance.yang@linux.dev \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=david@redhat.com \
    --cc=dev.jain@arm.com \
    --cc=hughd@google.com \
    --cc=ioworker0@gmail.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=mpenttil@redhat.com \
    --cc=npache@redhat.com \
    --cc=richard.weiyang@gmail.com \
    --cc=ryan.roberts@arm.com \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox