Patch "smp: Process pending softirqs in flush_smp_call_function_from_idle()" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    smp: Process pending softirqs in flush_smp_call_function_from_idle()

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     smp-process-pending-softirqs-in-flush_smp_call_funct.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 377e09047e64b35c9c430d25b867e13f75d4079d
Author: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Date:   Sat Jan 23 21:10:25 2021 +0100

    smp: Process pending softirqs in flush_smp_call_function_from_idle()
    
    [ Upstream commit 66040b2d5d41f85cb1a752a75260595344c5ec3b ]
    
    send_call_function_single_ipi() may wake an idle CPU without sending an
    IPI. The woken up CPU will process the SMP-functions in
    flush_smp_call_function_from_idle(). Any raised softirq from within the
    SMP-function call will not be processed.
    Should the CPU have no tasks assigned, then it will go back to idle with
    pending softirqs and the NOHZ will rightfully complain.
    
    Process pending softirqs on return from flush_smp_call_function_queue().
    
    Fixes: b2a02fc43a1f4 ("smp: Optimize send_call_function_single_ipi()")
    Reported-by: Jens Axboe <axboe@xxxxxxxxx>
    Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
    Link: https://lkml.kernel.org/r/20210123201027.3262800-2-bigeasy@xxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/smp.c b/kernel/smp.c
index 4d17501433be7..25240fb2df949 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -14,6 +14,7 @@
 #include <linux/export.h>
 #include <linux/percpu.h>
 #include <linux/init.h>
+#include <linux/interrupt.h>
 #include <linux/gfp.h>
 #include <linux/smp.h>
 #include <linux/cpu.h>
@@ -449,6 +450,9 @@ void flush_smp_call_function_from_idle(void)
 
 	local_irq_save(flags);
 	flush_smp_call_function_queue(true);
+	if (local_softirq_pending())
+		do_softirq();
+
 	local_irq_restore(flags);
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux