[RFC 00/10] Reclaimable kernel stacks
Peter Zijlstra
peterz at infradead.org
Fri Aug 28 05:47:58 PDT 2026
On Thu, Aug 27, 2026 at 04:29:38PM -0700, David Stevens wrote:
> On Android, system processes typically have 2000-3000 threads. App
> processes add 1000s more threads on top of this.
WTF ?!? Why does that all spawn *that* many threads? Perhaps work on
reducing that some?
> Tracking blocked state and when it is safe to reclaim a stack is done
> via a series of hooks in the scheduler. The actual reclaim of stacks is
> done asynchronously in a shrinker.
>
> Once a task's stack has been reclaimed, it cannot be rescheduled until
> its stack is repopulated. Although there can be a repopulation fast path
> within the scheduler, reliably allocating memory to repopulate the stack
> requires a fallback path that defers the repopulation and wakeup to a
> workqueue context that can use GFP_KERNEL.
I am really confused. On the one hand you have John working on proxy
execution, with the aim on reducing latencies, and then here you are,
posting something that will introduce basically unbound latencies.
More information about the linux-arm-kernel
mailing list