diff options
author | Sebastian Andrzej Siewior <[email protected]> | 2022-02-17 11:24:05 +0100 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2022-02-22 22:25:02 +0100 |
commit | e540bf3162e822d7a1f07e69e3bb1b4f925ca368 (patch) | |
tree | b4063b98ade2647194d15f92eea7dc3afc8ee55f /include/linux/fpga/fpga-bridge.h | |
parent | 1a03d3f13ffe5dd24142d6db629e72c11b704d99 (diff) |
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 <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Andy Lutomirski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'include/linux/fpga/fpga-bridge.h')
0 files changed, 0 insertions, 0 deletions