PowerTOP should not recommend ondemand when p4-clockmod is used. 
AFAIK the p4-clockmod is autoloaded for thermal purposes, but the
latency is too high for ondemand. There is RH bugzilla on it:

https://bugzilla.redhat.com/show_bug.cgi?id=497167

Proposed patch is attached. The idea is not to suggest ondemand
if there is at least one p4-clockmod driver found as the
suggestion is: "Enable the ondemand cpu speed governor for all 
processors...".

Jaroslav
--- powertop-1.13/cpufreq.c.old	2010-12-13 11:01:38.000000000 +0100
+++ powertop-1.13/cpufreq.c	2010-12-13 14:36:18.766847905 +0100
@@ -98,6 +98,23 @@
 			if (strcmp(gov, line))
 				ret = 1;
 		fclose(file);
+
+		/* check the scaling driver */
+		sprintf(filename, "/sys/devices/system/cpu/%s/cpufreq/scaling_driver", dirent->d_name);
+		file = fopen(filename, "r");
+		if (!file)
+			continue;
+		memset(line, 0, 1024);
+		if (fgets(line, 1023, file)==NULL) {
+			fclose(file);
+			continue;
+		}
+		fclose(file);
+		/* if the scaling driver is set to p4-clockmod, do not suggest ondemand and return */
+		if (strstr(line, "p4-clockmod")) {
+			closedir(dir);
+			return;
+		}
 	}
 
 	closedir(dir);
_______________________________________________
Power mailing list
[email protected]
http://www.bughost.org/mailman/listinfo/power

Reply via email to