• Linus Torvalds's avatar
    Merge tag 'core-core-2022-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · bba90e09
    Linus Torvalds authored
    Pull core process handling RT latency updates from Thomas Gleixner:
    
     - Reduce the amount of work to release a task stack in context switch.
       There is no real reason to do cgroup accounting and memory freeing in
       this performance sensitive context.
    
       Aside of this the invoked functions cannot be called from this
       preemption disabled context on PREEMPT_RT enabled kernels. Solve this
       by moving the accounting into do_exit() and delaying the freeing of
       the stack unless the vmap stack can be cached.
    
     - Provide a mechanism to delay raising signals from atomic context on
       PREEMPT_RT enabled kernels as sighand::lock cannot be acquired. Store
       the information in the task struct and raise it in the exit path.
    
    * tag 'core-core-2022-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      signal, x86: Delay calling signals in atomic on RT enabled kernels
      fork: Use IS_ENABLED() in account_kernel_stack()
      fork: Only cache the VMAP stack in finish_task_switch()
      fork: Move task stack accounting to do_exit()
      fork: Move memcg_charge_kernel_stack() into CONFIG_VMAP_STACK
      fork: Don't assign the stack pointer in dup_task_struct()
      fork, IA64: Provide alloc_thread_stack_node() for IA64
      fork: Duplicate task_struct before stack allocation
      fork: Redo ifdefs around task stack handling
    bba90e09
fork.c 78.8 KB