linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] introduce pagetable_alloc_nolock()
@ 2025-12-12 16:18 Yeoreum Yun
  2025-12-12 16:18 ` [PATCH 1/2] mm: " Yeoreum Yun
                   ` (2 more replies)
  0 siblings, 3 replies; 35+ messages in thread
From: Yeoreum Yun @ 2025-12-12 16:18 UTC (permalink / raw)
  To: akpm, david, lorenzo.stoakes, Liam.Howlett, vbabka, rppt, surenb,
	mhocko, ast, daniel, andrii, martin.lau, eddyz87, song,
	yonghong.song, john.fastabend, kpsingh, sdf, haoluo, jolsa,
	jackmanb, hannes, ziy, bigeasy, clrkwllms, rostedt,
	catalin.marinas, will, ryan.roberts, kevin.brodsky, dev.jain,
	yang
  Cc: linux-mm, linux-kernel, bpf, linux-rt-devel, linux-arm-kernel,
	Yeoreum Yun

Some architectures invoke pagetable_alloc() or __get_free_pages()
with preemption disabled.
For example, in arm64, linear_map_split_to_ptes() calls pagetable_alloc()
while spliting block entry to ptes and __kpti_install_ng_mappings()
calls __get_free_pages() to create kpti pagetable.

Under PREEMPT_RT, calling pagetable_alloc() with
preemption disabled is not allowed, because it may acquire
a spin lock that becomes sleepable on RT, potentially
causing a sleep during page allocation.

Since above two functions is called as callback of stop_machine()
where its callback is called in preemption disabled,
They could make a potential problem. (sleeping in preemption disabled).

To address this, introduce pagetable_alloc_nolock() API.

Yeoreum Yun (2):
  mm: introduce pagetable_alloc_nolock()
  arm64: mmu: use pagetable_alloc_nolock() while stop_machine()

 arch/arm64/mm/mmu.c  | 23 ++++++++++++++++++-----
 include/linux/mm.h   | 18 ++++++++++++++++++
 kernel/bpf/stream.c  |  2 +-
 kernel/bpf/syscall.c |  2 +-
 mm/page_alloc.c      | 10 +++-------
 5 files changed, 41 insertions(+), 14 deletions(-)

--
LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}



^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2025-12-24  7:02 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-12 16:18 [PATCH 0/2] introduce pagetable_alloc_nolock() Yeoreum Yun
2025-12-12 16:18 ` [PATCH 1/2] mm: " Yeoreum Yun
2025-12-12 16:18 ` [PATCH 2/2] arm64: mmu: use pagetable_alloc_nolock() while stop_machine() Yeoreum Yun
2025-12-13  7:05   ` Brendan Jackman
2025-12-14  9:13     ` Yeoreum Yun
2025-12-15  9:22       ` Brendan Jackman
2025-12-15  9:34         ` Yeoreum Yun
2025-12-15  9:55           ` Brendan Jackman
2025-12-15 10:06             ` Yeoreum Yun
2025-12-16 10:10               ` Brendan Jackman
2025-12-16 11:03                 ` Yeoreum Yun
2025-12-16 11:26                   ` Brendan Jackman
2025-12-16 12:01                     ` Yeoreum Yun
2025-12-16 12:39                       ` Brendan Jackman
2025-12-16 13:25                         ` Yeoreum Yun
2025-12-18  9:30   ` Michal Hocko
2025-12-18  9:36     ` Yeoreum Yun
2025-12-18 12:02       ` Ryan Roberts
2025-12-18 12:17         ` Michal Hocko
2025-12-18 12:24           ` Yeoreum Yun
2025-12-16 15:11 ` [PATCH 0/2] introduce pagetable_alloc_nolock() Ryan Roberts
2025-12-16 16:52   ` Yeoreum Yun
2025-12-17  9:34     ` Ryan Roberts
2025-12-17 10:48       ` Yeoreum Yun
2025-12-17 12:04         ` Ryan Roberts
2025-12-17 12:52           ` Yeoreum Yun
2025-12-17 13:15             ` Vlastimil Babka
2025-12-17 13:35               ` Brendan Jackman
2025-12-17 13:56                 ` Yeoreum Yun
2025-12-17 15:10                 ` Vlastimil Babka
2025-12-17 17:19                   ` Brendan Jackman
2025-12-18  7:47                     ` Vlastimil Babka
2025-12-18  7:52                   ` David Hildenbrand (Red Hat)
2025-12-23 22:59           ` Yang Shi
2025-12-24  7:00             ` Yeoreum Yun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox