Re: [RFC 06/10] Reclaim memory from blocked kernel stacks

From: Peter Zijlstra

Date: Mon Aug 31 2026 - 03:10:41 EST


On Mon, Aug 31, 2026 at 08:55:09AM +0200, Sebastian Andrzej Siewior wrote:
> (stack tracer running)
> Depth Size Location (60 entries)
> ----- ---- --------
> 0) 8176 48 __css_rstat_updated+0x9/0x150
> 1) 8128 8 __cgroup_account_cputime+0x2f/0x50
> 2) 8120 48 update_se+0x10c/0x1b0
> 3) 8072 48 update_curr+0x31/0x180
> 4) 8024 56 put_prev_entity+0x153/0x1f0
> 5) 7968 136 pick_next_task_fair+0x684/0x8e0
> 6) 7832 120 __schedule+0x1ca/0x1130
> 7) 7712 8 preempt_schedule_irq+0x38/0x60
> 8) 7704 72 irqentry_exit+0x148/0x6b0
> 9) 7632 136 asm_sysvec_apic_timer_interrupt+0x1a/0x20
> 10) 7496 240 HUF_compress1X_usingCTable_internal_bmi2+0x12d2/0x1c40

>
> Does this stack tracer distinguish between the kernel-stack and
> IRQ-stack? I would expect asm_sysvec_apic_timer_interrupt() on the
> IRQ-stack and not adding weight to the kernel stack.

This is the return from interrupt path, irqentry_exit() is right after
we switch back from the IRQ stack and are back on the task stack. We
have to be, in order to schedule the task and all that.