Dynamically sizing the kernel stack
Dynamically sizing the kernel stack
Posted May 21, 2024 18:49 UTC (Tue) by matthias (subscriber, #94967)In reply to: Dynamically sizing the kernel stack by epa
Parent article: Dynamically sizing the kernel stack
Of course, this can be arbitrarily complex. Swap space is still quite simple. Just think of faulting in a page from a memory-mapped file that lives in some FUSE filesystem. So you might actually need to wait for another user space process.
But it is not necessary to think that complicated. Faulting in a page just from swap takes ages (even with SSDs). Thus you want to yield to another thread. And the other thread might also have a page fault while you are still waiting for the first page. So even for the simplest of cases you really want the fault handler to be re-entrant.