lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20091031110301.eb3c83d3.krzysztof.h1@wp.pl>
Date:	Sat, 31 Oct 2009 11:03:01 +0100
From:	Krzysztof Helt <krzysztof.h1@...pl>
To:	Dave Jones <davej@...hat.com>
Cc:	cpufreq@...r.kernel.org, LKLM <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...e.hu>
Subject: [PATCH] powernow-k6: set transition latency value so ondemand
 governor can be used

From: Krzysztof Helt <krzysztof.h1@...pl>

Set the transition latency to value smaller than CPUFREQ_ETERNAL so
governors other than "performance" work (like the "ondemand" one).

The value is found in "AMD PowerNow! Technology Platform Design Guide for
Embedded Processors" dated December 2000 (AMD doc #24267A). There is the
answer to one of FAQs on page 40 which states that suggested complete
transition period is 200 us.

Tested on K6-2+ CPU with K6-3 core (model 13, stepping 4).

Signed-off-by: Krzysztof Helt <krzysztof.h1@...pl>
---
This is the second version of the patch with added comment into the source code.

 arch/x86/kernel/cpu/cpufreq/powernow-k6.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k6.c b/arch/x86/kernel/cpu/cpufreq/powernow-k6.c
index f10dea4..15f84a6 100644
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k6.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k6.c
@@ -163,8 +163,15 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy)
 			clock_ratio[i].frequency = busfreq * f;
 	}
 
-	/* cpuinfo and default policy values */
-	policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
+	/*
+	 * cpuinfo and default policy values
+	 *
+	 * The value is found in "AMD PowerNow! Technology Platform
+	 * Design Guide for Embedded Processors" dated December 2000
+	 * (AMD doc #24267A). There is the answer to one of FAQs on page 40
+	 * which states that suggested complete transition period is 200 us.
+	 */
+	policy->cpuinfo.transition_latency = 200000;
 	policy->cur = busfreq * max_multiplier;
 
 	result = cpufreq_frequency_table_cpuinfo(policy, clock_ratio);
-- 
1.6.4

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ