Booting with debug turned on on an Intel Nehalem server, notice the following output in "dmesg": ... cpufreq-core: target for CPU 0: 0 kHz, relation 0 acpi-cpufreq: acpi_cpufreq_target 0 (0) freq-table: request for target 0 kHz (relation: 0) for cpu 0 freq-table: target is 9 (1596000 kHz, 9) cpufreq-core: notification 0 of frequency transition to 1596000 kHz cpufreq-core: notification 1 of frequency transition to 1596000 kHz ... There are instances where "ondemand" asks for a target frequency of even 0. More generally, "ondemand" can ask for freq_next < policy->min, whenever "load" on the CPU drops to a level that satisfies the equation below: load < ((threshold - differential) * policy->min / policy->cur) Hence, the patch below. NOTE: Drivers such as "acpi-cpufreq" can make use of the freq-table helper function, cpufreq_frequency_table_target(), which presumably can take a target frequency < policy->min, and still provide an "index" that corresponds to Pn (lowest supported frequency). This can be seen in the "dmesg" output above. - naga - >-----Original Message----- >From: Thomas Renninger [mailto:trenn@xxxxxxx] >Sent: Monday, December 21, 2009 4:41 PM >To: Chumbalkar, Nagananda >Cc: davej@xxxxxxxxxx; mjg@xxxxxxxxxx; cpufreq@xxxxxxxxxxxxxxx; >linux-acpi@xxxxxxxxxxxxxxx; linux@xxxxxxxx >Subject: [PATCH 2/2] cpufreq: Fix ondemand to not request >targets outside policy limits > >From: Nagananda.Chumbalkar@xxxxxx > >Dominik said: >target_freq cannot be below policy->min or above policy->max. >If it were, the whole cpufreq subsystem is broken. > >But (answer): >I think the "ondemand" governor can ask for a target frequency that is >below policy->min. >... >A patch such as below may be needed to sanitize the target frequency >requested by "ondemand". The "conservative" governor already >has this check: > >Signed-off-by: Thomas Renninger <trenn@xxxxxxx> > ># diff -bur x/drivers/cpufreq/cpufreq_ondemand.c.orig >y/drivers/cpufreq/cpufreq_ondemand.c >diff --git a/drivers/cpufreq/cpufreq_ondemand.c >b/drivers/cpufreq/cpufreq_ondemand.c >index 4b34ade..bd444dc 100644 >--- a/drivers/cpufreq/cpufreq_ondemand.c >+++ b/drivers/cpufreq/cpufreq_ondemand.c >@@ -554,6 +554,9 @@ static void dbs_check_cpu(struct >cpu_dbs_info_s *this_dbs_info) > (dbs_tuners_ins.up_threshold - > dbs_tuners_ins.down_differential); > >+ if (freq_next < policy->min) >+ freq_next = policy->min; >+ > if (!dbs_tuners_ins.powersave_bias) { > __cpufreq_driver_target(policy, freq_next, > CPUFREQ_RELATION_L); >-- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html