Messages in this thread Patch in this message | | | From | Frederic Weisbecker <> | Subject | [RFC PATCH 10/30] softirq: Check enabled bits on the softirq loop | Date | Thu, 11 Oct 2018 01:11:57 +0200 |
| |
From: Frederic Weisbecker <fweisbec@gmail.com>
Check the enabled vector bits on softirq processing. Those that are pending but disabled will be ignored and handled by the interrupted code that disabled those vectors.
No effective change yet as the core isn't yet ready for softirq re-entrancy. All softirqs should be enabled all the time for now and driven through preempt_count().
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: David S. Miller <davem@davemloft.net> Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> --- kernel/softirq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/softirq.c b/kernel/softirq.c index fdb2574..75aab25 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -263,7 +263,7 @@ asmlinkage __visible void __softirq_entry __do_softirq(void) */ current->flags &= ~PF_MEMALLOC; - pending = local_softirq_pending(); + pending = local_softirq_pending() & local_softirq_enabled(); account_irq_enter_time(current); __local_bh_disable_ip(_RET_IP_, SOFTIRQ_OFFSET); @@ -271,7 +271,7 @@ asmlinkage __visible void __softirq_entry __do_softirq(void) restart: /* Reset the pending bitmask before enabling irqs */ - softirq_pending_nand(SOFTIRQ_ALL_MASK); + softirq_pending_nand(pending); local_irq_enable(); @@ -304,7 +304,7 @@ asmlinkage __visible void __softirq_entry __do_softirq(void) rcu_bh_qs(); local_irq_disable(); - pending = local_softirq_pending(); + pending = local_softirq_pending() & local_softirq_enabled(); if (pending) { if (time_before(jiffies, end) && !need_resched() && --max_restart) -- 2.7.4
| |