Skip to contentSkip to conversation

Warn if ondemand governor can not run due to too long transition latency

PATCH New Eric Piel 1 participant 1 message Mar 10, 2006 CPU frequency scaling framework

lore
Share & tools
lore

Eric Piel

author
#0 lore raw

PATCH 1/1 Warn if ondemand governor can not run due to too long transition latency

Hello,

The ondemand governor will not run if the transition latency of the driver is more than 10 ms. In such case, the selection of the governor will fail _silently_ (for the user). This is quite confusing and, indeed, there has already been several reports on this mailing list of user considering this as a bug.

So I suggest printing a warning message if this condition is triggered. That's what does the attached patch :-)

see you,
Eric

---
From: Eric Piel <[email protected]>

Display a warning if the ondemand governor can not be selected due to a transition latency of the cpufreq driver which is too long.

drivers/cpufreq/cpufreq_ondemand.c renamed from drivers/cpufreq/cpufreq_ondemand.c-keep-ignore-nice +4 -1
@@ -396,8 +396,11 @@ static int cpufreq_governor_dbs(struct c
 			return -EINVAL;
 
 		if (policy->cpuinfo.transition_latency >
-				(TRANSITION_LATENCY_LIMIT * 1000))
+				(TRANSITION_LATENCY_LIMIT * 1000)) {
+			printk(KERN_WARNING "ondemand governor failed to load "
+			       "due to too long transition latency\n");
 			return -EINVAL;
+		}
 		if (this_dbs_info->enable) /* Already enabled */
 			break;
 		 

_______________________________________________
Cpufreq mailing list
[email protected]
http://lists.linux.org.uk/mailman/listinfo/cpufreq