One more step toward converting ksoftirqd to per vector workqueues.

Suggested-by: Paolo Abeni <pab...@redhat.com>
Suggested-by: Linus Torvalds <torva...@linux-foundation.org>
Signed-off-by: Frederic Weisbecker <frede...@kernel.org>
Cc: Dmitry Safonov <d...@arista.com>
Cc: Eric Dumazet <eduma...@google.com>
Cc: Linus Torvalds <torva...@linux-foundation.org>
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Andrew Morton <a...@linux-foundation.org>
Cc: David Miller <da...@davemloft.net>
Cc: Hannes Frederic Sowa <han...@stressinduktion.org>
Cc: Ingo Molnar <mi...@kernel.org>
Cc: Levin Alexander <alexander.le...@verizon.com>
Cc: Paolo Abeni <pab...@redhat.com>
Cc: Paul E. McKenney <paul...@linux.vnet.ibm.com>
Cc: Radu Rendec <rren...@arista.com>
Cc: Rik van Riel <r...@redhat.com>
Cc: Stanislaw Gruszka <sgrus...@redhat.com>
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: Wanpeng Li <wanpeng...@hotmail.com>
Cc: Mauro Carvalho Chehab <mche...@s-opensource.com>
---
 kernel/softirq.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/kernel/softirq.c b/kernel/softirq.c
index becb1d9..bb0cffa 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -369,16 +369,14 @@ asmlinkage __visible void __softirq_entry 
__do_softirq(void)
 
        pending = local_softirq_pending() & ~softirq->pending_work_mask;
        if (pending) {
-               if (need_resched()) {
-                       wakeup_softirqd();
-               } else {
-                       /* Vectors that got re-enqueued are threaded */
-                       if (executed & pending)
-                               do_softirq_workqueue(executed & pending);
-                       pending &= ~executed;
-                       if (pending)
-                               goto restart;
-               }
+               if (need_resched())
+                       executed = pending;
+               /* Vectors that got re-enqueued are threaded */
+               if (executed & pending)
+                       do_softirq_workqueue(executed & pending);
+               pending &= ~executed;
+               if (pending)
+                       goto restart;
        }
 
        lockdep_softirq_end(in_hardirq);
-- 
2.7.4

Reply via email to