You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because new_kernel_stack iterates through the available stack
space linearly, it can only provide each stack slot once. This
means that there is a limited number of kernel threads that can
be created over the lifetime of the kernel. With the kernel
stack space defined so currently, and with one-page guard pages
for each stack, this would currently give a limit of 255 kernel
threads (including the initial thread).
To address this issue, we now recycle old kernel stack when their
thread exits. When we create a new thread, we check whether there
is a dead stack available. If so, we reuse it, rather than allocating
another. This means we go from having a limit of 255 kernel threads
ever to a limit of 255 simultaneous kernel threads. In practice,
this is likely to be sufficient.
0 commit comments