[PATCH 01/03]: Patch to test if system has Hyper-threading support
Signed-off-by: poornima nayak <[email protected]>
diff -uprN
ltp-full-20090228_orig/testcases/kernel/power_management/pm_include.sh
ltp-full-20090228/testcases/kernel/power_management/pm_include.sh
---
ltp-full-20090228_orig/testcases/kernel/power_management/pm_include.sh
2009-03-06 08:48:37.000000000 -0600
+++ ltp-full-20090228/testcases/kernel/power_management/pm_include.sh
2009-03-06 08:53:07.000000000 -0600
@@ -60,4 +60,12 @@ function get_supporting_freq() {
function get_supporting_govr() {
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors |
uniq
}
-
+function is_hyper_threaded() {
+ siblings=`cat /proc/cpuinfo | grep siblings | uniq | cut -f2 -d':'`
+ cpu_cores=`cat /proc/cpuinfo | grep "cpu cores" | uniq | cut -f2
-d':'`
+ if [ $siblings > $cpu_cores ]; then
+ return 1
+ else
+ return 0
+ fi
+}
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list