summaryrefslogtreecommitdiffstats
path: root/lib/btree.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2022-02-17 11:24:05 +0100
committerThomas Gleixner <tglx@linutronix.de>2022-02-22 22:25:02 +0100
commite540bf3162e822d7a1f07e69e3bb1b4f925ca368 (patch)
treeb4063b98ade2647194d15f92eea7dc3afc8ee55f /lib/btree.c
parent1a03d3f13ffe5dd24142d6db629e72c11b704d99 (diff)
downloadlinux-e540bf3162e822d7a1f07e69e3bb1b4f925ca368.tar.bz2
fork: Only cache the VMAP stack in finish_task_switch()
The task stack could be deallocated later, but for fork()/exec() kind of workloads (say a shell script executing several commands) it is important that the stack is released in finish_task_switch() so that in VMAP_STACK case it can be cached and reused in the new task. For PREEMPT_RT it would be good if the wake-up in vfree_atomic() could be avoided in the scheduling path. Far worse are the other free_thread_stack() implementations which invoke __free_pages()/ kmem_cache_free() with disabled preemption. Cache the stack in free_thread_stack() in the VMAP_STACK case and RCU-delay the free path otherwise. Free the stack in the RCU callback. In the VMAP_STACK case this is another opportunity to fill the cache. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Andy Lutomirski <luto@kernel.org> Link: https://lore.kernel.org/r/20220217102406.3697941-8-bigeasy@linutronix.de
Diffstat (limited to 'lib/btree.c')
0 files changed, 0 insertions, 0 deletions