From: "David Hildenbrand (Red Hat)" <david@kernel.org>
To: Yeoreum Yun <yeoreum.yun@arm.com>, Ryan Roberts <ryan.roberts@arm.com>
Cc: catalin.marinas@arm.com, will@kernel.org,
akpm@linux-foundation.org, kevin.brodsky@arm.com,
quic_zhenhuah@quicinc.com, dev.jain@arm.com,
yang@os.amperecomputing.com, chaitanyas.prakash@arm.com,
bigeasy@linutronix.de, clrkwllms@kernel.org, rostedt@goodmis.org,
lorenzo.stoakes@oracle.com, ardb@kernel.org, jackmanb@google.com,
vbabka@suse.cz, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev
Subject: Re: [PATCH v2 2/2] arm64: mmu: avoid allocating pages while installing ng-mapping for KPTI
Date: Thu, 18 Dec 2025 09:46:10 +0100 [thread overview]
Message-ID: <201d0fa3-2ebe-4df2-926c-9e11607a6f07@kernel.org> (raw)
In-Reply-To: <aUO9M/oN+nx3nfW+@e129823.arm.com>
On 12/18/25 09:37, Yeoreum Yun wrote:
> [...]
>>> I think it would be better to use only __GFP_HIGH in here since
>>> when kpti_install_ng_mappings() is called, "kswpd" doesn't created yet.
>>> and to allocate page with assurance, It would be good to use
>>> min_reserved to.
>>>
>>> Am I missing something?
>>
>> Personally I think we should just use "GFP_KERNEL | __GFP_ZERO". Anything else
>> would make this allocation look special, which it is not. If we fail to allocate
>> at this point in boot, we have bigger problems.
>
> But I'm not sure *HOW effective* to use GFP_KERNEL in here.
> Since it's before the any filesystem inited.
> IOW, in this context, almost there would be no *page cache*
> and I think it seems meaningless to use "GFP_KERNEL" and "direct
> reclaim"
>
> So to get success for allocation, __GFP_HIGH | _GFP_ZERO seems much
> better.
Unless there is a real reason to confuse readers why this is very
special, just go with "GFP_KERNEL | __GFP_ZERO", really.
In particular if it doesn't matter in practice? Or does it and we are
not getting your point?
--
Cheers
David
next prev parent reply other threads:[~2025-12-18 8:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-17 18:20 [PATCH v2 0/2] fix wrong usage of memory allocation APIs under PREEMPT_RT in arm64 Yeoreum Yun
2025-12-17 18:20 ` [PATCH v2 1/2] arm64: mmu: don't allocate page while spliting linear mapping Yeoreum Yun
2025-12-18 8:23 ` David Hildenbrand (Red Hat)
2025-12-18 9:08 ` Yeoreum Yun
2025-12-18 14:22 ` Ryan Roberts
2025-12-18 15:01 ` Yeoreum Yun
2025-12-18 15:42 ` Ryan Roberts
2025-12-18 15:54 ` Yeoreum Yun
2025-12-17 18:20 ` [PATCH v2 2/2] arm64: mmu: avoid allocating pages while installing ng-mapping for KPTI Yeoreum Yun
2025-12-17 19:03 ` Ryan Roberts
2025-12-17 19:09 ` Yeoreum Yun
2025-12-18 8:34 ` Ryan Roberts
2025-12-18 8:37 ` Yeoreum Yun
2025-12-18 8:46 ` David Hildenbrand (Red Hat) [this message]
2025-12-18 9:31 ` Yeoreum Yun
2025-12-18 9:41 ` David Hildenbrand (Red Hat)
2025-12-18 10:07 ` Yeoreum Yun
2025-12-18 7:51 ` Vlastimil Babka
2025-12-18 8:32 ` Ryan Roberts
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=201d0fa3-2ebe-4df2-926c-9e11607a6f07@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=catalin.marinas@arm.com \
--cc=chaitanyas.prakash@arm.com \
--cc=clrkwllms@kernel.org \
--cc=dev.jain@arm.com \
--cc=jackmanb@google.com \
--cc=kevin.brodsky@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=lorenzo.stoakes@oracle.com \
--cc=quic_zhenhuah@quicinc.com \
--cc=rostedt@goodmis.org \
--cc=ryan.roberts@arm.com \
--cc=vbabka@suse.cz \
--cc=will@kernel.org \
--cc=yang@os.amperecomputing.com \
--cc=yeoreum.yun@arm.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