[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1516077640-19718-6-git-send-email-frederic@kernel.org>
Date: Tue, 16 Jan 2018 05:40:40 +0100
From: Frederic Weisbecker <frederic@...nel.org>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Frederic Weisbecker <frederic@...nel.org>,
Levin Alexander <alexander.levin@...izon.com>,
Peter Zijlstra <peterz@...radead.org>,
Mauro Carvalho Chehab <mchehab@...pensource.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Hannes Frederic Sowa <hannes@...essinduktion.org>,
"Paul E . McKenney" <paulmck@...ux.vnet.ibm.com>,
Wanpeng Li <wanpeng.li@...mail.com>,
Dmitry Safonov <dima@...sta.com>,
Thomas Gleixner <tglx@...utronix.de>,
Eric Dumazet <edumazet@...gle.com>,
Radu Rendec <rrendec@...sta.com>,
Ingo Molnar <mingo@...nel.org>,
Stanislaw Gruszka <sgruszka@...hat.com>,
Paolo Abeni <pabeni@...hat.com>,
Rik van Riel <riel@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
David Miller <davem@...emloft.net>
Subject: [RFC/OPTIONAL PATCH 5/5] softirq: Reset vector call counter before workqueue completion
Once a softirq vector queue has been completed from the workqueue, its
call counter for the current jiffy frame can be reset in order to handle
those that will follow from the normal IRQ tail softirq processing.
Suggested-by: Linus Torvalds <torvalds@...ux-foundation.org>
Signed-off-by: Frederic Weisbecker <frederic@...nel.org>
Cc: Dmitry Safonov <dima@...sta.com>
Cc: Eric Dumazet <edumazet@...gle.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: David Miller <davem@...emloft.net>
Cc: Hannes Frederic Sowa <hannes@...essinduktion.org>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Levin Alexander <alexander.levin@...izon.com>
Cc: Paolo Abeni <pabeni@...hat.com>
Cc: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
Cc: Radu Rendec <rrendec@...sta.com>
Cc: Rik van Riel <riel@...hat.com>
Cc: Stanislaw Gruszka <sgruszka@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Wanpeng Li <wanpeng.li@...mail.com>
Cc: Mauro Carvalho Chehab <mchehab@...pensource.com>
---
kernel/softirq.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/kernel/softirq.c b/kernel/softirq.c
index b2a5384..4e5a0ef 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -255,10 +255,13 @@ static void vector_work_func(struct work_struct *work)
local_irq_disable();
pending = local_softirq_pending();
- if (pending & vec_bit)
+ if (pending & vec_bit) {
schedule_work_on(smp_processor_id(), &vector->work);
- else
+ } else {
softirq->pending_work_mask &= ~vec_bit;
+ vector->jiffy_calls = 0;
+ vector->jiffy_snap = jiffies;
+ }
lockdep_softirq_exit();
account_irq_exit_time(current);
--
2.7.4
Powered by blists - more mailing lists