linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cpuidle:powernv: Add the CPUIDLE_FLAG_POLLING for snooze
@ 2018-07-03  5:24 Gautham R. Shenoy
  2018-07-03 14:06 ` Vaidyanathan Srinivasan
  0 siblings, 1 reply; 4+ messages in thread
From: Gautham R. Shenoy @ 2018-07-03  5:24 UTC (permalink / raw)
  To: akshay.adiga, Vaidyanathan Srinivasan, Nicholas Piggin,
	Michael Ellerman, Rafael J. Wysocki, Daniel Lezcano
  Cc: linux-kernel, linux-pm, Gautham R. Shenoy

From: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>

In the situations where snooze is the only cpuidle state due to
firmware not exposing any platform idle states, the idle CPUs will
remain in snooze for a long time with interrupts disabled causing the
Hard-lockup detector to complain.

watchdog: CPU 51 detected hard LOCKUP on other CPUs 59
watchdog: CPU 51 TB:535296107736, last SMP heartbeat TB:527472229239 (15281ms ago)
watchdog: CPU 59 Hard LOCKUP
watchdog: CPU 59 TB:535296252849, last heartbeat TB:526554725466 (17073ms ago)

Fix this by adding CPUIDLE_FLAG_POLLING flag to the state, so that the
cpuidle governor will do the right thing, such as not stopping the
tick if it is going to put the idle cpu to snooze.

Reported-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
---
 drivers/cpuidle/cpuidle-powernv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c
index d29e4f0..b73041b 100644
--- a/drivers/cpuidle/cpuidle-powernv.c
+++ b/drivers/cpuidle/cpuidle-powernv.c
@@ -156,6 +156,7 @@ static int stop_loop(struct cpuidle_device *dev,
 	{ /* Snooze */
 		.name = "snooze",
 		.desc = "snooze",
+		.flags = CPUIDLE_FLAG_POLLING,
 		.exit_latency = 0,
 		.target_residency = 0,
 		.enter = snooze_loop },
-- 
1.9.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-05  6:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-03  5:24 [PATCH] cpuidle:powernv: Add the CPUIDLE_FLAG_POLLING for snooze Gautham R. Shenoy
2018-07-03 14:06 ` Vaidyanathan Srinivasan
2018-07-03 15:03   ` Gautham R Shenoy
2018-07-05  6:00     ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).