Re: [RFC 00/14] Dynamic Kernel Stacks

From: Pasha Tatashin
Date: Mon Mar 18 2024 - 13:38:15 EST


> > Perhaps a 'garbage collection' activity that reclaims stack
> > pages from processes that have been asleep 'for a while' or
> > haven't used a lot of stack recently (if hw 'page accessed'
> > bit can be used) might make more sense.

Interesting approach: if we take the original Andy's suggestion of
using an access bit to know which stack pages were never used during
context switch and unmap them, and as an extra optimization have a
"garbage collector" that unmaps stacks in some long sleeping rarely
used threads. I will think about this.

Thanks,
Pasha