Skip to contentSkip to conversation

Fix failures messages on multi socket hyper threaded system

PATCH In review Poornima Nayak 2 participants 4 messages Oct 28, 2009 – Oct 29, 2009

lore
Share & tools
lore
#1 lore raw

PATCH 2/2 to delete hardcoded cpu freq governers

In reply to Poornima Nayak

Patch to remove hard coded cpu governers

testcases/kernel/power_management/pwkm_load_unload.sh +2 -2
diff -uprN ltp/testcases/kernel/power_management/pwkm_load_unload.sh ltp_fixed/testcases/kernel/power_management/pwkm_load_unload.sh
@@ -3,7 +3,7 @@
 #Loading modules
 RC=0
 loaded_governor=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor`
-for module in cpufreq_conservative cpufreq_powersave cpufreq_userspace
+for module in `modprobe -l | grep cpufreq_ | cut -f8 -d"/" | cut -f1 -d"."`
 do
 	#echo -n "Loading $module ... "
     if [ $module != "cpufreq_$loaded_governor" ];
@@ -15,7 +15,7 @@ do
 		fi
 	fi
 done
-for module in cpufreq_conservative cpufreq_powersave cpufreq_userspace
+for module in `modprobe -l | grep cpufreq_ | cut -f8 -d"/" | cut -f1 -d"."`
 do
 	#echo -n "Unloading $module ... "
     if [ $module != "cpufreq_$loaded_governor" ];

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#0 lore raw

PATCH 1/2 Fix failures messages on multi socket hyper threaded system

Patch to fix unwanted failure messages

testcases/kernel/power_management/runpwtests.sh +18 -16
diff -uprN ltp/testcases/kernel/power_management/runpwtests.sh ltp_fixed/testcases/kernel/power_management/runpwtests.sh
@@ -169,22 +169,24 @@ if [ $? -ne 0 ] ; then
 	tst_resm TCONF "Python is not installed, CPU Consoldation\
 test cannot run"
 else
-	get_sched_values sched_mc; max_sched_mc=$?
-    echo "max sched mc $max_sched_mc"
-	for sched_mc in `seq 0 $max_sched_mc`; do
-		: $(( TST_COUNT+=1))
-		sched_domain.py -c $sched_mc; RC=$?
-		analyze_sched_domain_result $sched_mc $RC 
-		if [ $hyper_threaded -eq $YES ]; then
-			get_sched_values sched_smt; max_sched_smt=$?
-			for sched_smt in `seq 0 $max_sched_smt`; do
-				# Testcase to validate sched_domain tree
-				: $(( TST_COUNT+=1))
-				sched_domain.py -c $sched_mc -t $sched_smt; RC=$?
-				analyze_sched_domain_result $sched_mc $RC $sched_smt ;
-			done
-		fi
-	done
+	if [ -f /sys/devices/system/cpu/sched_mc_power_savings ] ; then
+		get_sched_values sched_mc; max_sched_mc=$?
+    	echo "max sched mc $max_sched_mc"
+		for sched_mc in `seq 0 $max_sched_mc`; do
+			: $(( TST_COUNT+=1))
+			sched_domain.py -c $sched_mc; RC=$?
+			analyze_sched_domain_result $sched_mc $RC 
+			if [ $hyper_threaded -eq $YES -a -f /sys/devices/system/cpu/sched_smt_power_savings ]; then
+				get_sched_values sched_smt; max_sched_smt=$?
+				for sched_smt in `seq 0 $max_sched_smt`; do
+					# Testcase to validate sched_domain tree
+					: $(( TST_COUNT+=1))
+					sched_domain.py -c $sched_mc -t $sched_smt; RC=$?
+					analyze_sched_domain_result $sched_mc $RC $sched_smt ;
+				done
+			fi
+		done
+	fi
 fi
 
 : $(( TST_COUNT+=1))

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#2 lore raw

Re: [LTP] [Patch 2/2] to delete hardcoded cpu freq governers

In reply to Poornima Nayak
Quoted 3 lines · Poornima Nayak

Patch to remove hard coded cpu governers

Thanks. Applied.

Regards--
Subrata

Quoted 25 lines

diff -uprN ltp/testcases/kernel/power_management/pwkm_load_unload.sh ltp_fixed/testcases/kernel/power_management/pwkm_load_unload.sh

testcases/kernel/power_management/pwkm_load_unload.sh +2 -3
@@ -3,7 +3,7 @@
 #Loading modules
 RC=0
 loaded_governor=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor`
-for module in cpufreq_conservative cpufreq_powersave cpufreq_userspace
+for module in `modprobe -l | grep cpufreq_ | cut -f8 -d"/" | cut -f1 -d"."`
 do
 	#echo -n "Loading $module ... "
     if [ $module != "cpufreq_$loaded_governor" ];
@@ -15,7 +15,7 @@ do
 		fi
 	fi
 done
-for module in cpufreq_conservative cpufreq_powersave cpufreq_userspace
+for module in `modprobe -l | grep cpufreq_ | cut -f8 -d"/" | cut -f1 -d"."`
 do
 	#echo -n "Unloading $module ... "
     if [ $module != "cpufreq_$loaded_governor" ];
 
------------------------------------------------------------------------------

Come build with us! The BlackBerry(R) Developer Conference in SF, CA

Quoted 8 lines

is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#3 lore raw
In reply to Poornima Nayak
Quoted 3 lines · Poornima Nayak

Patch to fix unwanted failure messages

Thanks. Applied.

Regards--
Subrata

Quoted 48 lines

diff -uprN ltp/testcases/kernel/power_management/runpwtests.sh ltp_fixed/testcases/kernel/power_management/runpwtests.sh

testcases/kernel/power_management/runpwtests.sh +18 -17
@@ -169,22 +169,24 @@ if [ $? -ne 0 ] ; then
 	tst_resm TCONF "Python is not installed, CPU Consoldation\
 test cannot run"
 else
-	get_sched_values sched_mc; max_sched_mc=$?
-    echo "max sched mc $max_sched_mc"
-	for sched_mc in `seq 0 $max_sched_mc`; do
-		: $(( TST_COUNT+=1))
-		sched_domain.py -c $sched_mc; RC=$?
-		analyze_sched_domain_result $sched_mc $RC 
-		if [ $hyper_threaded -eq $YES ]; then
-			get_sched_values sched_smt; max_sched_smt=$?
-			for sched_smt in `seq 0 $max_sched_smt`; do
-				# Testcase to validate sched_domain tree
-				: $(( TST_COUNT+=1))
-				sched_domain.py -c $sched_mc -t $sched_smt; RC=$?
-				analyze_sched_domain_result $sched_mc $RC $sched_smt ;
-			done
-		fi
-	done
+	if [ -f /sys/devices/system/cpu/sched_mc_power_savings ] ; then
+		get_sched_values sched_mc; max_sched_mc=$?
+    	echo "max sched mc $max_sched_mc"
+		for sched_mc in `seq 0 $max_sched_mc`; do
+			: $(( TST_COUNT+=1))
+			sched_domain.py -c $sched_mc; RC=$?
+			analyze_sched_domain_result $sched_mc $RC 
+			if [ $hyper_threaded -eq $YES -a -f /sys/devices/system/cpu/sched_smt_power_savings ]; then
+				get_sched_values sched_smt; max_sched_smt=$?
+				for sched_smt in `seq 0 $max_sched_smt`; do
+					# Testcase to validate sched_domain tree
+					: $(( TST_COUNT+=1))
+					sched_domain.py -c $sched_mc -t $sched_smt; RC=$?
+					analyze_sched_domain_result $sched_mc $RC $sched_smt ;
+				done
+			fi
+		done
+	fi
 fi
 
 : $(( TST_COUNT+=1))
 
------------------------------------------------------------------------------

Come build with us! The BlackBerry(R) Developer Conference in SF, CA

Quoted 8 lines

is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list