[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 7 Jul 2015 10:14:34 -0700
From: tip-bot for Thomas Gleixner <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: sudeep.holla@....com, tglx@...utronix.de, peterz@...radead.org,
Lorenzo.Pieralisi@....com, Catalin.Marinas@....com,
preeti@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
hpa@...or.com, Suzuki.Poulose@....com, rafael.j.wysocki@...el.com,
mingo@...nel.org
Subject: [tip:timers/urgent] tick/broadcast:
Return busy when IPI is pending
Commit-ID: 0cc5281aa592d0020868f6ccaed359b4ad7b2684
Gitweb: http://git.kernel.org/tip/0cc5281aa592d0020868f6ccaed359b4ad7b2684
Author: Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Tue, 7 Jul 2015 16:45:15 +0200
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Tue, 7 Jul 2015 18:46:48 +0200
tick/broadcast: Return busy when IPI is pending
Tell the idle code not to go deep if the broadcast IPI is about to
arrive.
[ Split out from a larger combo patch ]
Tested-by: Sudeep Holla <sudeep.holla@....com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: Suzuki Poulose <Suzuki.Poulose@....com>
Cc: Lorenzo Pieralisi <Lorenzo.Pieralisi@....com>
Cc: Catalin Marinas <Catalin.Marinas@....com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Preeti U Murthy <preeti@...ux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@...nel.org>
Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1507070929360.3916@nanos
---
kernel/time/tick-broadcast.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index da7b40f..70b47bc 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -725,11 +725,15 @@ int __tick_broadcast_oneshot_control(enum tick_broadcast_state state)
* if the cpu local event is earlier than the
* broadcast event. If the current CPU is in
* the force mask, then we are going to be
- * woken by the IPI right away.
+ * woken by the IPI right away; we return
+ * busy, so the CPU does not try to go deep
+ * idle.
*/
- if (!cpumask_test_cpu(cpu, tick_broadcast_force_mask) &&
- dev->next_event.tv64 < bc->next_event.tv64)
+ if (cpumask_test_cpu(cpu, tick_broadcast_force_mask)) {
+ ret = -EBUSY;
+ } else if (dev->next_event.tv64 < bc->next_event.tv64) {
tick_broadcast_set_event(bc, cpu, dev->next_event);
+ }
}
/*
* If the current CPU owns the hrtimer broadcast
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists