From: Yeoreum Yun <yeoreum.yun@arm.com>
To: Harry Yoo <harry.yoo@oracle.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [Question] Question about GFP_ATOMIC allocations on PREEMPT_RT kernel
Date: Sun, 8 Jun 2025 16:15:44 +0100 [thread overview]
Message-ID: <aEWpILmdSFzaEQOi@e129823.arm.com> (raw)
In-Reply-To: <aEWWkij1LMT-Ywhu@hyeyoo>
Hi Harry,
[...]
>
> You're not supposed allocate (even with GFP_ATOMIC) or free memory on
> PREEMPT_RT in non-threaded interrupt context [1].
>
> I think it somwhow implied in [2]? (Ok, probably not that obvious)
>
> "Acquiring a raw_spinlock_t disables preemption and possibly also
> interrupts, so the critical section must avoid acquiring a regular
> spinlock_t or rwlock_t, for example, the critical section must avoid
> allocating memory."
>
> "But this code fails on PREEMPT_RT kernels because the memory allocator
> is fully preemptible and therefore cannot be invoked from truly atomic
> contexts."
>
> [1] https://lore.kernel.org/linux-mm/YwZSUpYY9l442Lxr@linutronix.de
>
> [2] https://www.kernel.org/doc/html/latest/locking/locktypes.html#raw-spinlock-t-on-rt
>
Thanks for clear reference :D
I miss the clause of [2]...
--
Sincerely,
Yeoreum Yun
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
prev parent reply other threads:[~2025-06-08 15:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-08 13:33 Yeo Reum Yun
2025-06-08 13:56 ` Harry Yoo
2025-06-08 15:15 ` Yeoreum Yun [this message]
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=aEWpILmdSFzaEQOi@e129823.arm.com \
--to=yeoreum.yun@arm.com \
--cc=harry.yoo@oracle.com \
--cc=linux-mm@kvack.org \
/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