[RFC 06/10] Reclaim memory from blocked kernel stacks
Peter Zijlstra
peterz at infradead.org
Sat Aug 29 01:49:01 PDT 2026
On Fri, Aug 28, 2026 at 01:50:05PM -0700, David Stevens wrote:
> > It should have. They're taking spinlock inside raw_spinlock and lockdep
> > should very much warn about that by default.
>
> It does trylocks on spinlocks and local locks, inside of
> alloc_pages_nolock_noprof(). Lockdep considers that safe.
Argh, that alloc_pages_nolock thing is a horror show.
> On PREEMPT_RT, it is necessary to skip the call to
> alloc_pages_nolock_noprof() from under pi_lock, since with that
> configuration spin_trylock can end up needing to take pi_lock. But at
> least on !PREEMPT_RT, there is no risk of deadlock.
Yeah, which puts the lie to that horrific hack Alexei did. We should
probably teach lockdep about spin_trylock() not being safe and see the
house of cards crumble.
More information about the linux-arm-kernel
mailing list