Messages in this thread Patch in this message | | | From | Frederic Weisbecker <> | Subject | [RFC PATCH 3/5] softirq: Defer to workqueue when rescheduling is needed | Date | Tue, 16 Jan 2018 05:40:38 +0100 |
| |
One more step toward converting ksoftirqd to per vector workqueues.
Suggested-by: Paolo Abeni <pabeni@redhat.com> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Cc: Dmitry Safonov <dima@arista.com> Cc: Eric Dumazet <edumazet@google.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: David Miller <davem@davemloft.net> Cc: Hannes Frederic Sowa <hannes@stressinduktion.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Levin Alexander <alexander.levin@verizon.com> Cc: Paolo Abeni <pabeni@redhat.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Radu Rendec <rrendec@arista.com> Cc: Rik van Riel <riel@redhat.com> Cc: Stanislaw Gruszka <sgruszka@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Wanpeng Li <wanpeng.li@hotmail.com> Cc: Mauro Carvalho Chehab <mchehab@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 255da68..441e654 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -389,16 +389,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 overreached the limits are threaded */ - if (overrun & pending) - do_softirq_workqueue(overrun & pending); - pending &= ~overrun; - if (pending) - goto restart; - } + if (need_resched()) + overrun = pending; + /* Vectors that overreached the limits are threaded */ + if (overrun & pending) + do_softirq_workqueue(overrun & pending); + pending &= ~overrun; + if (pending) + goto restart; } lockdep_softirq_end(in_hardirq); -- 2.7.4
| |