All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [Patch 1/8] New testcase to validate Ideal Load Balancer Functionality
@ 2009-08-28 10:14 Poornima Nayak
  2009-08-28 10:14 ` [LTP] [Patch 2/8] Power management master script modified to integrate ILB testcase Poornima Nayak
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Poornima Nayak @ 2009-08-28 10:14 UTC (permalink / raw)
  To: ltp-list, svaidy, ego, arun

New testcase to validate Ideal Load Balancer Functionality.
By default sets sched_mc_power_savings & sched_smt_power savings to the value
passed as argument and then triggers kernbench by pinning it to the CPUn

Signed-off-by: poornima nayak <mpnayak@linux.vnet.ibm.com>

diff -uprN ltp_orig/testcases/kernel/power_management/ilb_test.py ltp/testcases/kernel/power_management/ilb_test.py
--- ltp_orig/testcases/kernel/power_management/ilb_test.py	1970-01-01 05:30:00.000000000 +0530
+++ ltp/testcases/kernel/power_management/ilb_test.py	2009-08-28 12:13:27.000000000 +0530
@@ -0,0 +1,57 @@
+#!/usr/bin/python
+''' This Python script interprets interrupt values.
+    Validates Ideal load balancer runs in same package where workload is running
+'''
+
+import os
+import sys
+LIB_DIR = "%s/testcases/kernel/power_management/lib" % os.environ['LTPROOT']
+sys.path.append(LIB_DIR)
+from optparse import OptionParser
+from sched_mc import *
+
+__author__ = "Poornima Nayak <mpnayak@linux.vnet.ibm.com>"
+
+class Usage(Exception):
+    def __init__(self, msg):
+        self.msg = msg
+
+def main(argv=None):
+    if argv is None:
+        argv = sys.argv
+
+    usage = "-w"
+    parser = OptionParser(usage)
+    parser.add_option("-c", "--mc_level", dest="mc_level",
+        default=0, help="Sched mc power saving value 0/1/2")
+    parser.add_option("-t", "--smt_level", dest="smt_level",
+        default=0, help="Sched smt power saving value 0/1/2")
+    parser.add_option("-w", "--workload", dest="work_ld",
+        default="kernbench", help="Workload can be ebizzy/kernbench")
+    (options, args) = parser.parse_args()
+
+    try:
+        count_num_cpu()
+        count_num_sockets()
+        if is_multi_socket():
+            set_sched_mc_power(options.mc_level)
+        if is_hyper_threaded():
+            set_sched_smt_power(options.smt_level)
+        map_cpuid_pkgid()
+        print "INFO: Created table mapping cpu to package"
+        background="no"
+        duration=60
+        pinned="yes"
+        trigger_workld(options.work_ld, "single_job", duration, background, pinned)
+        generate_loc_intr_report()
+        status = validate_ilb(options.mc_level, options.smt_level)
+        reset_schedmc()
+        if is_hyper_threaded():
+            reset_schedsmt()
+        return(status)        
+    except Exception, details:
+        print "INFO: Idle Load Balancer test failed", details
+        return(1)
+
+if __name__ == "__main__":
+    sys.exit(main())

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [LTP] [Patch 2/8] Power management master script modified to integrate ILB testcase
  2009-08-28 10:14 [LTP] [Patch 1/8] New testcase to validate Ideal Load Balancer Functionality Poornima Nayak
@ 2009-08-28 10:14 ` Poornima Nayak
  2009-08-30 17:36   ` Subrata Modak
  2009-08-28 10:14 ` [LTP] [Patch 3/8] Patch to integrate ILB testcase to LTP Poornima Nayak
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Poornima Nayak @ 2009-08-28 10:14 UTC (permalink / raw)
  To: ltp-list, arun, svaidy, ego

Power management master script modified to integrate ILB testcases

Signed-off-by: poornima nayak <mpnayak@linux.vnet.ibm.com>

diff -uprN ltp_orig/testcases/kernel/power_management/runpwtests.sh ltp/testcases/kernel/power_management/runpwtests.sh
--- ltp_orig/testcases/kernel/power_management/runpwtests.sh	2009-08-28 10:54:59.000000000 +0530
+++ ltp/testcases/kernel/power_management/runpwtests.sh	2009-08-28 12:29:52.000000000 +0530
@@ -69,7 +69,7 @@ is_dual_core; dual_core=$?
 #Checking sched_mc sysfs interface
 #check_config.sh config_sched_mc || RC=$?
 TST_COUNT=1
-if [ $multi_socket -eq $YES -a $dual_core -eq $YES ] ; then
+if [ $multi_socket -eq $YES -a $multi_core -eq $YES ] ; then
 	if [ -f /sys/devices/system/cpu/sched_mc_power_savings ] ; then
 		if test_sched_mc.sh ; then
 			tst_resm TPASS "SCHED_MC sysfs tests"
@@ -232,7 +232,7 @@ if [ $# -gt 0 -a "$1" = "-exclusive" ]; 
 			if [ $hyper_threaded -eq $YES ]; then
 				for sched_smt in `seq 0 $max_sched_smt`; do
 					for work_load in ${work_loads_list}; do
-                   		: $(( TST_COUNT += 1 ))
+                   				: $(( TST_COUNT += 1 ))
 						sched_mc_smt_pass_cnt=0
 						for repeat_test in `seq 1  10`; do
 							# Testcase to validate CPU consolidation for
@@ -260,6 +260,60 @@ if [ $# -gt 0 -a "$1" = "-exclusive" ]; 
 		done
 		analyze_core_consolidation_result $sched_smt $work_load $sched_smt_pass_cnt
 	fi
+        # Verify ILB runs in same package as workload
+        if [ $multi_socket -eq $YES -a $multi_core -eq $YES ]; then
+		work_loads_list="ebizzy kernbench"	
+		for sched_mc in `seq 0 $max_sched_mc`; do
+			for work_load in ${work_loads_list}
+			do
+				: $(( TST_COUNT += 1 ))
+                                ilb_test.py -c $sched_mc -w $work_load; RC=$?
+				if [ $RC -eq 0 ]; then
+					tst_resm TPASS "ILB & workload in same package for sched_mc=$sched_mc"
+				else
+					if [ $sched_mc -eq 0 ]; then
+						tst_resm TPASS "ILB & workload is not in same package when sched_mc=0"
+					else
+						tst_resm TFAIL "ILB did not run in same package"
+					fi
+				fi
+			done
+			if [ $hyper_threaded -eq $YES ]; then
+				for sched_smt in `seq 0 $max_sched_smt`; do
+					for work_load in ${work_loads_list}; do
+						: $(( TST_COUNT += 1 ))
+						ilb_test.py -c $sched_mc -t sched_smt -w $work_load; RC=$?
+ 						if [ $RC -eq 0 ]; then
+							tst_resm TPASS "ILB & workload in same package for sched_mc=$sched_mc"
+						else
+							if [ $sched_mc -eq 0 ]; then
+								tst_resm TPASS "ILB & workload is not in same package when sched_mc=0"
+							else
+								tst_resm TFAIL "ILB did not run in same package"    
+							fi
+						fi
+					done
+				done
+			fi
+		done
+	fi
+	if [ $multi_socket -eq $YES -a $hyper_threaded -eq $YES -a $multi_core -eq $YES ]; then
+		for sched_smt in `seq 0 $max_sched_smt`; do
+			for work_load in ${work_loads_list}; do
+				: $(( TST_COUNT += 1 ))
+				ilb_test.py -t $sched_smt -w $work_load; RC=$?
+				if [ $RC -eq 0 ]; then
+					tst_resm TPASS "ILB & workload not load not in same package for sched_smt=$sched_smt"
+				else
+					if [ $sched_smt -eq 0 ]; then
+						tst_resm TPASS "Its oky if ILB is not in same package when sched_smt=0"
+					else
+						tst_resm TFAIL "ILB did not run in same package"
+					fi
+				fi
+			done
+		done
+	fi
 fi
 
 exit $RC

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [LTP] [Patch 3/8] Patch to integrate ILB testcase to LTP
  2009-08-28 10:14 [LTP] [Patch 1/8] New testcase to validate Ideal Load Balancer Functionality Poornima Nayak
  2009-08-28 10:14 ` [LTP] [Patch 2/8] Power management master script modified to integrate ILB testcase Poornima Nayak
@ 2009-08-28 10:14 ` Poornima Nayak
  2009-08-30 17:36   ` Subrata Modak
  2009-08-28 10:15 ` [LTP] [Patch 4/8] Addional new reusable functions for ILB testing Poornima Nayak
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Poornima Nayak @ 2009-08-28 10:14 UTC (permalink / raw)
  To: ltp-list, svaidy, ego, arun

Patch to integrate ILB testcase to LTP

Signed-off-by: poornima nayak <mpnayak@linux.vnet.ibm.com>

diff -uprN ltp_orig/testcases/kernel/power_management/Makefile ltp/testcases/kernel/power_management/Makefile
--- ltp_orig/testcases/kernel/power_management/Makefile	2009-08-28 10:54:59.000000000 +0530
+++ ltp/testcases/kernel/power_management/Makefile	2009-08-28 12:28:50.000000000 +0530
@@ -49,6 +49,7 @@ install:
 	ln -f  check_cpuidle_sysfs_files.sh ../../bin/check_cpuidle_sysfs_files.sh;
 	ln -f  cpu_consolidation.py ../../bin/cpu_consolidation.py
 	ln -f  sched_domain.py ../../bin/sched_domain.py
+	ln -f  ilb_test.py ../../bin/ilb_test.py
 	chmod ugo+x *.sh
 clean:
 	@set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i $@ ; done

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [LTP] [Patch 4/8] Addional new reusable functions for ILB testing
  2009-08-28 10:14 [LTP] [Patch 1/8] New testcase to validate Ideal Load Balancer Functionality Poornima Nayak
  2009-08-28 10:14 ` [LTP] [Patch 2/8] Power management master script modified to integrate ILB testcase Poornima Nayak
  2009-08-28 10:14 ` [LTP] [Patch 3/8] Patch to integrate ILB testcase to LTP Poornima Nayak
@ 2009-08-28 10:15 ` Poornima Nayak
  2009-08-30 17:36   ` Subrata Modak
  2009-08-28 10:15 ` [LTP] [Patch 5/8] Modified library functions based on review comments Poornima Nayak
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Poornima Nayak @ 2009-08-28 10:15 UTC (permalink / raw)
  To: ltp-list, arun, svaidy, ego

Developed new functions to support ILB test execution and result verification.
Minimal changes has been done for exisitng function to support ILB
test execution.

Signed-off-by: poornima nayak <mpnayak@linux.vnet.ibm.com>

diff -uprN ltp_orig/testcases/kernel/power_management/lib/sched_mc.py ltp/testcases/kernel/power_management/lib/sched_mc.py
--- ltp_orig/testcases/kernel/power_management/lib/sched_mc.py	2009-08-28 10:54:59.000000000 +0530
+++ ltp/testcases/kernel/power_management/lib/sched_mc.py	2009-08-28 12:24:55.000000000 +0530
@@ -15,8 +15,12 @@ cpu_map = {}
 stats_start = {}
 stats_stop = {}
 stats_percentage = {}
+intr_start = []
+intr_stop = []
 cpu_count = 0
 socket_count = 0
+cpu1_max_intr = 0
+cpu2_max_intr = 0
 
 def clear_dmesg():
     '''
@@ -162,6 +166,23 @@ def get_proc_data(stats_list):
         print "Could not read statistics", e
         sys.exit(1)
 
+def get_proc_loc_count(loc_stats):
+    ''' Read /proc/stat info and store in dictionary
+    '''
+    try:
+        file_procstat = open("/proc/interrupts", 'r')
+        for line in file_procstat:
+            if line.startswith('LOC:'):
+                data = line.split()
+                for i in range(0, cpu_count):
+                    # To skip LOC
+                    loc_stats.append(data[i+1])
+        file_procstat.close()
+    except Exception, details:
+        print "Could not read interrupt statistics", details
+        sys.exit(1)
+
+
 def set_sched_mc_power(sched_mc_level):
     ''' Routine to set sched_mc_power_savings to required level
     '''
@@ -184,7 +205,23 @@ def set_sched_smt_power(sched_smt_level)
         print "Could not set sched_smt_power_savings to", sched_smt_level, e
 	sys.exit(1)
 
-def trigger_ebizzy (stress, duration, background):
+def set_timer_migration_interface(value):
+    ''' Set value of timer migration interface to a value
+        passed as argument
+    '''
+    try:
+        os.system('echo %s > \
+            /proc/sys/kernel/timer_migration 2>/dev/null' % value)
+    except OSError, e:
+        print "Could not set timer_migration to ", value, e
+        sys.exit(1)
+
+def start_cyclictest():
+    ''' Trigger cyclictest in background to increase
+        timer interrupts
+    '''
+    
+def trigger_ebizzy (stress, duration, background, pinned):
     ''' Triggers ebizzy workload for sched_mc=1
         testing
     '''
@@ -197,6 +234,9 @@ def trigger_ebizzy (stress, duration, ba
                 threads = threads / get_hyper_thread_count()
         if stress == "full":
 	    threads = cpu_count
+        if stress == "single_job":
+            threads = 1
+            duration = 180
 
         olddir = os.getcwd()
         path = '%s/utils/benchmark' % os.environ['LTPROOT']
@@ -220,7 +260,10 @@ def trigger_ebizzy (stress, duration, ba
                 if background == "yes":
                     succ = os.system('./ebizzy -t%s -s4096 -S %s >/dev/null &' % (threads, duration))
                 else:
-                    succ = os.system('./ebizzy -t%s -s4096 -S %s >/dev/null' % (threads, duration))
+                    if pinned == "yes":
+                        succ = os.system('taskset -c %s ./ebizzy -t%s -s4096 -S %s >/dev/null' % (cpu_count -1, threads, duration))
+                    else:
+                        succ = os.system('./ebizzy -t%s -s4096 -S %s >/dev/null' % (threads, duration))
          
                 if succ == 0: 
                     print "INFO: ebizzy workload triggerd"
@@ -238,7 +281,7 @@ def trigger_ebizzy (stress, duration, ba
         print "Ebizzy workload trigger failed ", details
         sys.exit(1)   
 
-def trigger_kernbench (stress, background):
+def trigger_kernbench (stress, background, pinned):
     ''' Trigger load on system like kernbench.
         Copys existing copy of LTP into as LTP2 and then builds it
         with make -j
@@ -253,6 +296,8 @@ def trigger_kernbench (stress, backgroun
                 threads = threads / get_hyper_thread_count()
         if stress == "full":
             threads = cpu_count
+        if stress == "single_job":
+            threads = 1
 
         dst_path = "/root"
         olddir = os.getcwd()      
@@ -283,27 +328,31 @@ def trigger_kernbench (stress, backgroun
         else:
             print "INFO: Linux kernel source not found. Kernbench cannot be executed"
 	    sys.exit(1)
-   
+  
         get_proc_data(stats_start)
-        os.system ( '%s/kernbench -o %s -M -H -n 1 >/dev/null 2>&1' % (benchmark_path, threads))
-        print threads
+        get_proc_loc_count(intr_start)
+        if pinned == "yes":
+            os.system ( 'taskset -c %s %s/kernbench -o %s -M -H -n 1 >/dev/null 2>&1' % (cpu_count-1, benchmark_path, threads))
+        else:
+            os.system ( '%s/kernbench -o %s -M -H -n 1 >/dev/null 2>&1' % (benchmark_path, threads))
         
         print "INFO: Workload kernbench triggerd"
         os.chdir(olddir)
         get_proc_data(stats_stop)
+        get_proc_loc_count(intr_stop)
     except Exception, details:
-        print "Workload trigger kernbench failed ", details
+        print "Workload kernbench trigger failed ", details
         sys.exit(1)
    
-def trigger_workld(workload, stress, duration, background):
+def trigger_workld(workload, stress, duration, background, pinned):
     ''' Triggers workload passed as argument. Number of threads 
         triggered is based on stress value.
     '''
     try:
         if workload == "ebizzy":
-            trigger_ebizzy (stress, duration, background)
+            trigger_ebizzy (stress, duration, background, pinned)
         if workload == "kernbench":
-            trigger_kernbench (stress, background)
+            trigger_kernbench (stress, background, pinned)
     except Exception, details:
         print "INFO: Trigger workload failed", details
         sys.exit(1)
@@ -386,6 +435,22 @@ def generate_report():
     print >> keyvalfile
     keyvalfile.close()
 
+def generate_loc_intr_report():
+    ''' Generate interrupt report of CPU's
+    '''
+    if (not os.path.exists('/procstat')):
+        os.mkdir('/procstat')
+
+    reportfile = open('/procstat/cpu-loc_interrupts', 'a')
+    print >> reportfile, "=============================================================="
+    print >> reportfile, "                Local timer interrupt stats                   "
+    print >> reportfile, "=============================================================="
+    for i in range(0, cpu_count):
+        intr_stop[i] =  int(intr_stop[i]) - int(intr_start[i])
+        print >> reportfile, "CPU%s: %s" %(i, intr_stop[i])
+    print >> reportfile
+    reportfile.close()
+
 def expand_range(range_val):
     '''
        Expand the range of value into actual numbers
@@ -462,6 +527,7 @@ def validate_cpugrp_map(cpu_group, sched
                 pkg_cpus = cpu_map[pkg]
                 if pkg_cpus == cpu_group:
                     return(0)
+                 
             return(1) 
     except Exception, details:
         print "Exception in validate_cpugrp_map: ", details
@@ -540,6 +606,53 @@ def validate_cpu_consolidation(work_ld, 
         print "Exception in validate_cpu_consolidation: ", details
         sys.exit(1)
 
+def get_cpuid_max_intr_count():
+    '''Return the cpu id's of two cpu's with highest number of intr'''
+    try:
+        highest = 0
+        second_highest = 0
+        global cpu1_max_intr, cpu2_max_intr
+        #Skipping CPU0 as it is generally high
+        for i in range(1, cpu_count):
+            if int(intr_stop[i]) > int(highest):
+                if highest != 0:
+                    second_highest = highest
+                    cpu2_max_intr = cpu1_max_intr
+                highest = int(intr_stop[i])
+                cpu1_max_intr = i
+            else:
+                if int(intr_stop[i]) > int(second_highest):
+                    second_highest = int(intr_stop[i])
+                    cpu2_max_intr = i
+        for i in range(1, cpu_count):
+            if i != cpu1_max_intr and i != cpu2_max_intr:
+                diff = second_highest - intr_stop[i]
+                ''' Threshold of difference has to be manipulated with multiple test'''
+                if diff < 10000:
+                    print "INFO: Difference in interrupt count is below threshold"
+                    return 1
+        print "INFO: Interrupt count in other CPU's low as expected"
+        return 0 
+    except Exception, details:
+        print "Exception in get_cpuid_max_intr_count: ", details
+        sys.exit(1)
+  
+def validate_ilb (sched_mc_level, sched_smt_level):
+    ''' Validate if ilb is running in same package where work load is running
+    '''
+    try:
+        status = get_cpuid_max_intr_count()
+        if status == 1:
+            return 1
+        for pkg in sorted(cpu_map.keys()):
+            if cpu1_max_intr in cpu_map[pkg] and cpu2_max_intr in cpu_map[pkg]:
+                return 0
+        print "INFO: CPUs with higher interrupt count is not in same package"
+        return 1
+    except Exception, details:
+        print "Exception in validate_ilb: ", details
+        sys.exit(1)
+    
 def reset_schedmc():
     ''' Routine to reset sched_mc_power_savings to Zero level
     '''

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [LTP] [Patch 5/8] Modified library functions based on review comments
  2009-08-28 10:14 [LTP] [Patch 1/8] New testcase to validate Ideal Load Balancer Functionality Poornima Nayak
                   ` (2 preceding siblings ...)
  2009-08-28 10:15 ` [LTP] [Patch 4/8] Addional new reusable functions for ILB testing Poornima Nayak
@ 2009-08-28 10:15 ` Poornima Nayak
  2009-08-30 17:36   ` Subrata Modak
  2009-08-28 10:15 ` [LTP] [Patch 6/8] Included new function to check feature versus kernel version Poornima Nayak
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Poornima Nayak @ 2009-08-28 10:15 UTC (permalink / raw)
  To: ltp-list, svaidy, ego, arun

Incorporated Garrett Cooper's comments & hence modified code

Signed-off-by: poornima nayak <mpnayak@linux.vnet.ibm.com>

diff -uprN ltp_orig/testcases/kernel/power_management/pm_include.sh ltp/testcases/kernel/power_management/pm_include.sh
--- ltp_orig/testcases/kernel/power_management/pm_include.sh	2009-08-28 10:54:59.000000000 +0530
+++ ltp/testcases/kernel/power_management/pm_include.sh	2009-08-28 12:34:00.000000000 +0530
@@ -9,20 +9,23 @@ MISSING_FILE=3
 UNTESTED=4
 YES=0
 
-function cleanup() {
+cleanup() {
 	if [ -f ${1} ] ; then
 		rm -f ${1}
 	fi
 }
-function check_config_options() {
+
+check_config_options() {
 	if ( ! ${3} "${1}" ${2} | grep -v "#" > /dev/null ) ; then
 		echo "NOSUPPORT: current system dosen't support ${1}"
 	fi
 }
-function no_of_cpus() {
+
+no_of_cpus() {
 	echo $(cat /proc/cpuinfo | grep processor | wc -l)
 }
-function get_topology() {
+
+get_topology() {
 	declare -a cpus
 	declare -a phyid
 
@@ -43,7 +46,8 @@ function get_topology() {
 		(( j+=1 ))
 	done
 }
-function check_cpufreq() {
+
+check_cpufreq() {
 	total_cpus=$(no_of_cpus)
 	(( total_cpus-=1 ))
 
@@ -55,24 +59,22 @@ function check_cpufreq() {
 		fi
 	done
 }
-function get_supporting_freq() {
+
+get_supporting_freq() {
 	cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_frequencies | uniq	
 }
-function get_supporting_govr() {
+
+get_supporting_govr() {
 	cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors | uniq
 }
 
-function is_hyper_threaded() {
+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 -eq $cpu_cores ]; then
-		return 1
-	else
-		return 0
-	fi
+	[ $siblins > $cpu_cores ]; return $?
 }
 
-function check_input() {
+check_input() {
 	validity_check=${2:-valid}
 	testfile=$3
 	if [ "${validity_check}" = "invalid" ] ; then
@@ -103,61 +105,39 @@ function check_input() {
 	return $RC
 }
 
-function is_multi_socket() {
+is_multi_socket() {
 	no_of_sockets=`cat /sys/devices/system/cpu/cpu?/topology/physical_package_id | uniq | wc -l`
-	if [ $no_of_sockets -gt 1 ] ; then
-		return 0
-	else
-		return 1
-	fi
+	[ $no_of_sockets -gt 1 ] ; return $?
 }
 
-function is_multi_core() {
+is_multi_core() {
 	siblings=`cat /proc/cpuinfo | grep siblings | uniq | cut -f2 -d':'`
 	cpu_cores=`cat /proc/cpuinfo | grep "cpu cores" | uniq | cut -f2 -d':'`
-	echo "siblings count $siblings cores count $cpu_cores"
 	if [ $siblings -eq $cpu_cores ]; then
-		if [ $cpu_cores -gt 1 ]; then
-			return 0
-		else
-			return 1
-		fi
+		[ $cpu_cores -gt 1 ]; return $?
 	else
 		: $(( num_of_cpus = siblings / cpu_cores ))
-		if [ $num_of_cpus -gt 1 ]; then
-			return 0
-		else
-			return 1
-		fi
+		[ $num_of_cpus -gt 1 ]; return $?
 	fi
 }		
 
-function is_dual_core() {
+is_dual_core() {
 	siblings=`cat /proc/cpuinfo | grep siblings | uniq | cut -f2 -d':'`
         cpu_cores=`cat /proc/cpuinfo | grep "cpu cores" | uniq | cut -f2 -d':'`
         if [ $siblings -eq $cpu_cores ]; then
-                if [ $cpu_cores -eq 2 ]; then
-                        return 1
-                else
-                        return 0
-                fi
+                [ $cpu_cores -eq 2 ]; return $?
         else
                 : $(( num_of_cpus = siblings / cpu_cores ))
-                if [ $num_of_cpus -eq 2 ]; then
-                        echo "number of cpus $num_of_cpus"
-                        return 1
-                else
-                        return 0
-                fi
+                [ $num_of_cpus -eq 2 ]; return $?
         fi
 }
 
-function get_kernel_version() {
+get_kernel_version() {
 	# Get kernel minor version
 	export kernel_version=`uname -r | awk -F. '{print $1"."$2"."$3}' | cut -f1 -d'-'`
 }
 
-function get_valid_input() {
+get_valid_input() {
 	kernel_version=$1
 	case "$kernel_version" in
 	'2.6.26' | '2.6.27' | '2.6.28')
@@ -166,22 +146,14 @@ function get_valid_input() {
 	esac
 }
 		
-function check_supp_wkld() {
+check_supp_wkld() {
 	sched_mcsmt=$1
 	work_load=$2
 
 	case "$sched_mcsmt" in
-		1) if [ "$work_load" == "ebizzy" ]; then
-				return 0
-			else
-				return 1
-			fi
+		1) [ "$work_load" == "ebizzy" ]; return $?
 			;;
-		2) if [ "$work_load" == "ebizzy" -o "$work_load" == "kernbench" ]; then
-                return 0
-            else
-                return 1
-            fi
+		2) [ "$work_load" == "ebizzy" -o "$work_load" == "kernbench" ]; return $?
             ;;
 		*) 
                return 1
@@ -189,7 +161,7 @@ function check_supp_wkld() {
 	esac
 }
 
-function analyze_wrt_workload_hyperthreaded() {
+analyze_wrt_workload_hyperthreaded() {
 	sched_mc=$1
     work_load=$2
     pass_count=$3
@@ -223,7 +195,7 @@ unsupported workload $work_load when sch
         esac
 }
 
-function analyze_wrt_wkld() {
+analyze_wrt_wkld() {
 	sched_mc=$1
     work_load=$2
     pass_count=$3
@@ -257,7 +229,7 @@ unsupported workload $work_load when sch
 	fi
 }
 
-function analyze_result_hyperthreaded() {
+analyze_result_hyperthreaded() {
 	sched_mc=$1
     work_load=$2
     pass_count=$3
@@ -299,13 +271,12 @@ $sched_mc for workload=$work_load"
 	esac
 }
 
-function analyze_package_consolidation_result() {
+analyze_package_consolidation_result() {
 	sched_mc=$1
     work_load=$2
     pass_count=$3
 	sched_smt=$4
 
-	echo "sched mc $sched_mc sched smt is $sched_smt workload $work_load pass count $pass_count"
 	if [ $hyper_threaded -eq $YES ]; then
 		analyze_result_hyperthreaded $sched_mc $work_load $pass_count $sched_smt
 	else
@@ -326,7 +297,7 @@ $sched_mc for workload=$work_load"
 	fi
 }
 
-function analyze_core_consolidation_result() {
+analyze_core_consolidation_result() {
 	sched_smt=$1
 	work_load=$2
 	pass_count=$3
@@ -353,7 +324,7 @@ unsupported workload $work_load when sch
 	esac
 }
 
-function analyze_sched_domain_result(){
+analyze_sched_domain_result(){
 	sched_mc=$1
 	result=$2
 	sched_smt=$3

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [LTP] [Patch 6/8] Included new function to check feature versus kernel version
  2009-08-28 10:14 [LTP] [Patch 1/8] New testcase to validate Ideal Load Balancer Functionality Poornima Nayak
                   ` (3 preceding siblings ...)
  2009-08-28 10:15 ` [LTP] [Patch 5/8] Modified library functions based on review comments Poornima Nayak
@ 2009-08-28 10:15 ` Poornima Nayak
  2009-08-30 17:36   ` Subrata Modak
  2009-08-28 10:15 ` [LTP] [Patch 7/8] Patch for cpu_consolidation to incorporate changes in reusable function Poornima Nayak
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Poornima Nayak @ 2009-08-28 10:15 UTC (permalink / raw)
  To: ltp-list, arun, svaidy, ego

Included new function to check feature versus kernel version

Signed-off-by: poornima nayak <mpnayak@linux.vnet.ibm.com>

diff -uprN ltp_orig/testcases/kernel/power_management/check_kv_arch.c ltp/testcases/kernel/power_management/check_kv_arch.c
--- ltp_orig/testcases/kernel/power_management/check_kv_arch.c	2009-08-28 10:54:59.000000000 +0530
+++ ltp/testcases/kernel/power_management/check_kv_arch.c	2009-08-28 12:36:07.000000000 +0530
@@ -23,6 +23,12 @@ int kernel_is_too_old(void) {
 	return 0;
 }
 
+int check_timer_migr_supp(void) {
+	if (tst_kvercmp(2,6,31) < 0)
+		return 1;
+	return 0;
+}
+
 /*
  * yeah, to make the makefile coding easier, do_check returns
  * 1 if unshare is not supported, 0 if it is
@@ -35,7 +41,17 @@ int do_check(void) { return kernel_is_to
 int do_check(void) { return 1; }
 #endif
 
-int main() {
-	return do_check();
+int main(int argc, char *argv[]) {
+	char feature[20];
+	if (argc == 1) 
+		return do_check();
+	else
+	{
+		printf("argument is %s", argv[1]);
+		if (strcmp(argv[1], "timer_migration")==0)
+			if (check_timer_migr_supp() == 0)
+				return 0;
+			else
+				return 1;
+	} 
 }
-

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [LTP] [Patch 7/8] Patch for cpu_consolidation to incorporate changes in reusable function
  2009-08-28 10:14 [LTP] [Patch 1/8] New testcase to validate Ideal Load Balancer Functionality Poornima Nayak
                   ` (4 preceding siblings ...)
  2009-08-28 10:15 ` [LTP] [Patch 6/8] Included new function to check feature versus kernel version Poornima Nayak
@ 2009-08-28 10:15 ` Poornima Nayak
  2009-08-30 17:36   ` Subrata Modak
  2009-08-28 10:15 ` [LTP] [Patch 8/8]Patch to modify Readme file as new functionality testcase is integrated Poornima Nayak
  2009-08-30 17:36 ` [LTP] [Patch 1/8] New testcase to validate Ideal Load Balancer Functionality Subrata Modak
  7 siblings, 1 reply; 16+ messages in thread
From: Poornima Nayak @ 2009-08-28 10:15 UTC (permalink / raw)
  To: ltp-list, svaidy, ego, arun

Patch for cpu_consolidation to incorporate changes in reusable function

Signed-off-by: poornima nayak <mpnayak@linux.vnet.ibm.com>

diff -uprN ltp_orig/testcases/kernel/power_management/cpu_consolidation.py ltp/testcases/kernel/power_management/cpu_consolidation.py
--- ltp_orig/testcases/kernel/power_management/cpu_consolidation.py	2009-08-28 10:54:59.000000000 +0530
+++ ltp/testcases/kernel/power_management/cpu_consolidation.py	2009-08-28 12:17:34.000000000 +0530
@@ -43,7 +43,8 @@ def main(argv=None):
         print "INFO: Created table mapping cpu to package"
         background="no"
         duration=60
-        trigger_workld(options.work_ld, options.stress, duration, background)
+        pinned ="no"
+        trigger_workld(options.work_ld, options.stress, duration, background, pinned)
         generate_report()
         status = validate_cpu_consolidation(options.work_ld,options.mc_level, options.smt_level)
         reset_schedmc()

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [LTP] [Patch 8/8]Patch to modify Readme file as new functionality testcase is integrated
  2009-08-28 10:14 [LTP] [Patch 1/8] New testcase to validate Ideal Load Balancer Functionality Poornima Nayak
                   ` (5 preceding siblings ...)
  2009-08-28 10:15 ` [LTP] [Patch 7/8] Patch for cpu_consolidation to incorporate changes in reusable function Poornima Nayak
@ 2009-08-28 10:15 ` Poornima Nayak
  2009-08-30 17:37   ` Subrata Modak
  2009-08-30 17:36 ` [LTP] [Patch 1/8] New testcase to validate Ideal Load Balancer Functionality Subrata Modak
  7 siblings, 1 reply; 16+ messages in thread
From: Poornima Nayak @ 2009-08-28 10:15 UTC (permalink / raw)
  To: ltp-list, arun, svaidy, ego

Updated Readme w.r.t new testcases

Signed-off-by: poornima nayak <mpnayak@linux.vnet.ibm.com>

diff -uprN ltp_orig/testcases/kernel/power_management/README ltp/testcases/kernel/power_management/README
--- ltp_orig/testcases/kernel/power_management/README	2009-08-28 10:54:59.000000000 +0530
+++ ltp/testcases/kernel/power_management/README	2009-08-28 12:31:08.000000000 +0530
@@ -82,3 +82,6 @@ To run cpu consolidation test user has t
 Refer to README in LTPROOT/utils/benchmark/ebizzy-0.2 directory for details of ebizzy.
 
 To test CPU consolidation for sched_mc 2 kernbench has to run. Kernbench needs linux kernel source as input in /root directory . For example download from http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.29.4.tar.bz2. If Linux kernel source not found kernbench wiil  not execute.
+CPU consolidation testcases will not execute if number of CPU's in package is less then 2. If system is hyper threaded but number of CPU is 1 only sched_smt testcases will be excuted. For better coverage of testcases select a system which is atleast quad core and then hyper threaded so that you will observe 8 CPU's in each package.
+
+Timer migration interface test will execute on kernel versions 2.6.31 and above. Timer migration functionality verification testcases will be executed only on suitable architecture like quad core or the number of CPU's in each package should be atleast 4 and above

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [LTP] [Patch 1/8] New testcase to validate Ideal Load Balancer Functionality
  2009-08-28 10:14 [LTP] [Patch 1/8] New testcase to validate Ideal Load Balancer Functionality Poornima Nayak
                   ` (6 preceding siblings ...)
  2009-08-28 10:15 ` [LTP] [Patch 8/8]Patch to modify Readme file as new functionality testcase is integrated Poornima Nayak
@ 2009-08-30 17:36 ` Subrata Modak
  7 siblings, 0 replies; 16+ messages in thread
From: Subrata Modak @ 2009-08-30 17:36 UTC (permalink / raw)
  To: Poornima Nayak; +Cc: ltp-list, arun, svaidy, ego

On Fri, 2009-08-28 at 15:44 +0530, Poornima Nayak wrote: 
> New testcase to validate Ideal Load Balancer Functionality.
> By default sets sched_mc_power_savings & sched_smt_power savings to the value
> passed as argument and then triggers kernbench by pinning it to the CPUn
> 
> Signed-off-by: poornima nayak <mpnayak@linux.vnet.ibm.com>

Done. Thanks.

Regards--
Subrata

> 
> diff -uprN ltp_orig/testcases/kernel/power_management/ilb_test.py ltp/testcases/kernel/power_management/ilb_test.py
> --- ltp_orig/testcases/kernel/power_management/ilb_test.py	1970-01-01 05:30:00.000000000 +0530
> +++ ltp/testcases/kernel/power_management/ilb_test.py	2009-08-28 12:13:27.000000000 +0530
> @@ -0,0 +1,57 @@
> +#!/usr/bin/python
> +''' This Python script interprets interrupt values.
> +    Validates Ideal load balancer runs in same package where workload is running
> +'''
> +
> +import os
> +import sys
> +LIB_DIR = "%s/testcases/kernel/power_management/lib" % os.environ['LTPROOT']
> +sys.path.append(LIB_DIR)
> +from optparse import OptionParser
> +from sched_mc import *
> +
> +__author__ = "Poornima Nayak <mpnayak@linux.vnet.ibm.com>"
> +
> +class Usage(Exception):
> +    def __init__(self, msg):
> +        self.msg = msg
> +
> +def main(argv=None):
> +    if argv is None:
> +        argv = sys.argv
> +
> +    usage = "-w"
> +    parser = OptionParser(usage)
> +    parser.add_option("-c", "--mc_level", dest="mc_level",
> +        default=0, help="Sched mc power saving value 0/1/2")
> +    parser.add_option("-t", "--smt_level", dest="smt_level",
> +        default=0, help="Sched smt power saving value 0/1/2")
> +    parser.add_option("-w", "--workload", dest="work_ld",
> +        default="kernbench", help="Workload can be ebizzy/kernbench")
> +    (options, args) = parser.parse_args()
> +
> +    try:
> +        count_num_cpu()
> +        count_num_sockets()
> +        if is_multi_socket():
> +            set_sched_mc_power(options.mc_level)
> +        if is_hyper_threaded():
> +            set_sched_smt_power(options.smt_level)
> +        map_cpuid_pkgid()
> +        print "INFO: Created table mapping cpu to package"
> +        background="no"
> +        duration=60
> +        pinned="yes"
> +        trigger_workld(options.work_ld, "single_job", duration, background, pinned)
> +        generate_loc_intr_report()
> +        status = validate_ilb(options.mc_level, options.smt_level)
> +        reset_schedmc()
> +        if is_hyper_threaded():
> +            reset_schedsmt()
> +        return(status)        
> +    except Exception, details:
> +        print "INFO: Idle Load Balancer test failed", details
> +        return(1)
> +
> +if __name__ == "__main__":
> +    sys.exit(main())
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [LTP] [Patch 2/8] Power management master script modified to integrate ILB testcase
  2009-08-28 10:14 ` [LTP] [Patch 2/8] Power management master script modified to integrate ILB testcase Poornima Nayak
@ 2009-08-30 17:36   ` Subrata Modak
  0 siblings, 0 replies; 16+ messages in thread
From: Subrata Modak @ 2009-08-30 17:36 UTC (permalink / raw)
  To: Poornima Nayak; +Cc: ltp-list, svaidy, ego, arun

On Fri, 2009-08-28 at 15:44 +0530, Poornima Nayak wrote: 
> Power management master script modified to integrate ILB testcases
> 
> Signed-off-by: poornima nayak <mpnayak@linux.vnet.ibm.com>

Ok.

Regards--
Subrata

> 
> diff -uprN ltp_orig/testcases/kernel/power_management/runpwtests.sh ltp/testcases/kernel/power_management/runpwtests.sh
> --- ltp_orig/testcases/kernel/power_management/runpwtests.sh	2009-08-28 10:54:59.000000000 +0530
> +++ ltp/testcases/kernel/power_management/runpwtests.sh	2009-08-28 12:29:52.000000000 +0530
> @@ -69,7 +69,7 @@ is_dual_core; dual_core=$?
>  #Checking sched_mc sysfs interface
>  #check_config.sh config_sched_mc || RC=$?
>  TST_COUNT=1
> -if [ $multi_socket -eq $YES -a $dual_core -eq $YES ] ; then
> +if [ $multi_socket -eq $YES -a $multi_core -eq $YES ] ; then
>  	if [ -f /sys/devices/system/cpu/sched_mc_power_savings ] ; then
>  		if test_sched_mc.sh ; then
>  			tst_resm TPASS "SCHED_MC sysfs tests"
> @@ -232,7 +232,7 @@ if [ $# -gt 0 -a "$1" = "-exclusive" ]; 
>  			if [ $hyper_threaded -eq $YES ]; then
>  				for sched_smt in `seq 0 $max_sched_smt`; do
>  					for work_load in ${work_loads_list}; do
> -                   		: $(( TST_COUNT += 1 ))
> +                   				: $(( TST_COUNT += 1 ))
>  						sched_mc_smt_pass_cnt=0
>  						for repeat_test in `seq 1  10`; do
>  							# Testcase to validate CPU consolidation for
> @@ -260,6 +260,60 @@ if [ $# -gt 0 -a "$1" = "-exclusive" ]; 
>  		done
>  		analyze_core_consolidation_result $sched_smt $work_load $sched_smt_pass_cnt
>  	fi
> +        # Verify ILB runs in same package as workload
> +        if [ $multi_socket -eq $YES -a $multi_core -eq $YES ]; then
> +		work_loads_list="ebizzy kernbench"	
> +		for sched_mc in `seq 0 $max_sched_mc`; do
> +			for work_load in ${work_loads_list}
> +			do
> +				: $(( TST_COUNT += 1 ))
> +                                ilb_test.py -c $sched_mc -w $work_load; RC=$?
> +				if [ $RC -eq 0 ]; then
> +					tst_resm TPASS "ILB & workload in same package for sched_mc=$sched_mc"
> +				else
> +					if [ $sched_mc -eq 0 ]; then
> +						tst_resm TPASS "ILB & workload is not in same package when sched_mc=0"
> +					else
> +						tst_resm TFAIL "ILB did not run in same package"
> +					fi
> +				fi
> +			done
> +			if [ $hyper_threaded -eq $YES ]; then
> +				for sched_smt in `seq 0 $max_sched_smt`; do
> +					for work_load in ${work_loads_list}; do
> +						: $(( TST_COUNT += 1 ))
> +						ilb_test.py -c $sched_mc -t sched_smt -w $work_load; RC=$?
> + 						if [ $RC -eq 0 ]; then
> +							tst_resm TPASS "ILB & workload in same package for sched_mc=$sched_mc"
> +						else
> +							if [ $sched_mc -eq 0 ]; then
> +								tst_resm TPASS "ILB & workload is not in same package when sched_mc=0"
> +							else
> +								tst_resm TFAIL "ILB did not run in same package"    
> +							fi
> +						fi
> +					done
> +				done
> +			fi
> +		done
> +	fi
> +	if [ $multi_socket -eq $YES -a $hyper_threaded -eq $YES -a $multi_core -eq $YES ]; then
> +		for sched_smt in `seq 0 $max_sched_smt`; do
> +			for work_load in ${work_loads_list}; do
> +				: $(( TST_COUNT += 1 ))
> +				ilb_test.py -t $sched_smt -w $work_load; RC=$?
> +				if [ $RC -eq 0 ]; then
> +					tst_resm TPASS "ILB & workload not load not in same package for sched_smt=$sched_smt"
> +				else
> +					if [ $sched_smt -eq 0 ]; then
> +						tst_resm TPASS "Its oky if ILB is not in same package when sched_smt=0"
> +					else
> +						tst_resm TFAIL "ILB did not run in same package"
> +					fi
> +				fi
> +			done
> +		done
> +	fi
>  fi
> 
>  exit $RC
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [LTP] [Patch 3/8] Patch to integrate ILB testcase to LTP
  2009-08-28 10:14 ` [LTP] [Patch 3/8] Patch to integrate ILB testcase to LTP Poornima Nayak
@ 2009-08-30 17:36   ` Subrata Modak
  0 siblings, 0 replies; 16+ messages in thread
From: Subrata Modak @ 2009-08-30 17:36 UTC (permalink / raw)
  To: Poornima Nayak; +Cc: ltp-list, arun, svaidy, ego

On Fri, 2009-08-28 at 15:44 +0530, Poornima Nayak wrote: 
> Patch to integrate ILB testcase to LTP
> 
> Signed-off-by: poornima nayak <mpnayak@linux.vnet.ibm.com>

Thanks.

Regards--
Subrata

> 
> diff -uprN ltp_orig/testcases/kernel/power_management/Makefile ltp/testcases/kernel/power_management/Makefile
> --- ltp_orig/testcases/kernel/power_management/Makefile	2009-08-28 10:54:59.000000000 +0530
> +++ ltp/testcases/kernel/power_management/Makefile	2009-08-28 12:28:50.000000000 +0530
> @@ -49,6 +49,7 @@ install:
>  	ln -f  check_cpuidle_sysfs_files.sh ../../bin/check_cpuidle_sysfs_files.sh;
>  	ln -f  cpu_consolidation.py ../../bin/cpu_consolidation.py
>  	ln -f  sched_domain.py ../../bin/sched_domain.py
> +	ln -f  ilb_test.py ../../bin/ilb_test.py
>  	chmod ugo+x *.sh
>  clean:
>  	@set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i $@ ; done
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [LTP] [Patch 4/8] Addional new reusable functions for ILB testing
  2009-08-28 10:15 ` [LTP] [Patch 4/8] Addional new reusable functions for ILB testing Poornima Nayak
@ 2009-08-30 17:36   ` Subrata Modak
  0 siblings, 0 replies; 16+ messages in thread
From: Subrata Modak @ 2009-08-30 17:36 UTC (permalink / raw)
  To: Poornima Nayak; +Cc: ltp-list, svaidy, ego, arun

On Fri, 2009-08-28 at 15:45 +0530, Poornima Nayak wrote: 
> Developed new functions to support ILB test execution and result verification.
> Minimal changes has been done for exisitng function to support ILB
> test execution.
> 
> Signed-off-by: poornima nayak <mpnayak@linux.vnet.ibm.com>

Thanks.

> 
> diff -uprN ltp_orig/testcases/kernel/power_management/lib/sched_mc.py ltp/testcases/kernel/power_management/lib/sched_mc.py
> --- ltp_orig/testcases/kernel/power_management/lib/sched_mc.py	2009-08-28 10:54:59.000000000 +0530
> +++ ltp/testcases/kernel/power_management/lib/sched_mc.py	2009-08-28 12:24:55.000000000 +0530
> @@ -15,8 +15,12 @@ cpu_map = {}
>  stats_start = {}
>  stats_stop = {}
>  stats_percentage = {}
> +intr_start = []
> +intr_stop = []
>  cpu_count = 0
>  socket_count = 0
> +cpu1_max_intr = 0
> +cpu2_max_intr = 0
> 
>  def clear_dmesg():
>      '''
> @@ -162,6 +166,23 @@ def get_proc_data(stats_list):
>          print "Could not read statistics", e
>          sys.exit(1)
> 
> +def get_proc_loc_count(loc_stats):
> +    ''' Read /proc/stat info and store in dictionary
> +    '''
> +    try:
> +        file_procstat = open("/proc/interrupts", 'r')
> +        for line in file_procstat:
> +            if line.startswith('LOC:'):
> +                data = line.split()
> +                for i in range(0, cpu_count):
> +                    # To skip LOC
> +                    loc_stats.append(data[i+1])
> +        file_procstat.close()
> +    except Exception, details:
> +        print "Could not read interrupt statistics", details
> +        sys.exit(1)
> +
> +
>  def set_sched_mc_power(sched_mc_level):
>      ''' Routine to set sched_mc_power_savings to required level
>      '''
> @@ -184,7 +205,23 @@ def set_sched_smt_power(sched_smt_level)
>          print "Could not set sched_smt_power_savings to", sched_smt_level, e
>  	sys.exit(1)
> 
> -def trigger_ebizzy (stress, duration, background):
> +def set_timer_migration_interface(value):
> +    ''' Set value of timer migration interface to a value
> +        passed as argument
> +    '''
> +    try:
> +        os.system('echo %s > \
> +            /proc/sys/kernel/timer_migration 2>/dev/null' % value)
> +    except OSError, e:
> +        print "Could not set timer_migration to ", value, e
> +        sys.exit(1)
> +
> +def start_cyclictest():
> +    ''' Trigger cyclictest in background to increase
> +        timer interrupts
> +    '''
> +    
> +def trigger_ebizzy (stress, duration, background, pinned):
>      ''' Triggers ebizzy workload for sched_mc=1
>          testing
>      '''
> @@ -197,6 +234,9 @@ def trigger_ebizzy (stress, duration, ba
>                  threads = threads / get_hyper_thread_count()
>          if stress == "full":
>  	    threads = cpu_count
> +        if stress == "single_job":
> +            threads = 1
> +            duration = 180
> 
>          olddir = os.getcwd()
>          path = '%s/utils/benchmark' % os.environ['LTPROOT']
> @@ -220,7 +260,10 @@ def trigger_ebizzy (stress, duration, ba
>                  if background == "yes":
>                      succ = os.system('./ebizzy -t%s -s4096 -S %s >/dev/null &' % (threads, duration))
>                  else:
> -                    succ = os.system('./ebizzy -t%s -s4096 -S %s >/dev/null' % (threads, duration))
> +                    if pinned == "yes":
> +                        succ = os.system('taskset -c %s ./ebizzy -t%s -s4096 -S %s >/dev/null' % (cpu_count -1, threads, duration))
> +                    else:
> +                        succ = os.system('./ebizzy -t%s -s4096 -S %s >/dev/null' % (threads, duration))
>           
>                  if succ == 0: 
>                      print "INFO: ebizzy workload triggerd"
> @@ -238,7 +281,7 @@ def trigger_ebizzy (stress, duration, ba
>          print "Ebizzy workload trigger failed ", details
>          sys.exit(1)   
> 
> -def trigger_kernbench (stress, background):
> +def trigger_kernbench (stress, background, pinned):
>      ''' Trigger load on system like kernbench.
>          Copys existing copy of LTP into as LTP2 and then builds it
>          with make -j
> @@ -253,6 +296,8 @@ def trigger_kernbench (stress, backgroun
>                  threads = threads / get_hyper_thread_count()
>          if stress == "full":
>              threads = cpu_count
> +        if stress == "single_job":
> +            threads = 1
> 
>          dst_path = "/root"
>          olddir = os.getcwd()      
> @@ -283,27 +328,31 @@ def trigger_kernbench (stress, backgroun
>          else:
>              print "INFO: Linux kernel source not found. Kernbench cannot be executed"
>  	    sys.exit(1)
> -   
> +  
>          get_proc_data(stats_start)
> -        os.system ( '%s/kernbench -o %s -M -H -n 1 >/dev/null 2>&1' % (benchmark_path, threads))
> -        print threads
> +        get_proc_loc_count(intr_start)
> +        if pinned == "yes":
> +            os.system ( 'taskset -c %s %s/kernbench -o %s -M -H -n 1 >/dev/null 2>&1' % (cpu_count-1, benchmark_path, threads))
> +        else:
> +            os.system ( '%s/kernbench -o %s -M -H -n 1 >/dev/null 2>&1' % (benchmark_path, threads))
>          
>          print "INFO: Workload kernbench triggerd"
>          os.chdir(olddir)
>          get_proc_data(stats_stop)
> +        get_proc_loc_count(intr_stop)
>      except Exception, details:
> -        print "Workload trigger kernbench failed ", details
> +        print "Workload kernbench trigger failed ", details
>          sys.exit(1)
>     
> -def trigger_workld(workload, stress, duration, background):
> +def trigger_workld(workload, stress, duration, background, pinned):
>      ''' Triggers workload passed as argument. Number of threads 
>          triggered is based on stress value.
>      '''
>      try:
>          if workload == "ebizzy":
> -            trigger_ebizzy (stress, duration, background)
> +            trigger_ebizzy (stress, duration, background, pinned)
>          if workload == "kernbench":
> -            trigger_kernbench (stress, background)
> +            trigger_kernbench (stress, background, pinned)
>      except Exception, details:
>          print "INFO: Trigger workload failed", details
>          sys.exit(1)
> @@ -386,6 +435,22 @@ def generate_report():
>      print >> keyvalfile
>      keyvalfile.close()
> 
> +def generate_loc_intr_report():
> +    ''' Generate interrupt report of CPU's
> +    '''
> +    if (not os.path.exists('/procstat')):
> +        os.mkdir('/procstat')
> +
> +    reportfile = open('/procstat/cpu-loc_interrupts', 'a')
> +    print >> reportfile, "=============================================================="
> +    print >> reportfile, "                Local timer interrupt stats                   "
> +    print >> reportfile, "=============================================================="
> +    for i in range(0, cpu_count):
> +        intr_stop[i] =  int(intr_stop[i]) - int(intr_start[i])
> +        print >> reportfile, "CPU%s: %s" %(i, intr_stop[i])
> +    print >> reportfile
> +    reportfile.close()
> +
>  def expand_range(range_val):
>      '''
>         Expand the range of value into actual numbers
> @@ -462,6 +527,7 @@ def validate_cpugrp_map(cpu_group, sched
>                  pkg_cpus = cpu_map[pkg]
>                  if pkg_cpus == cpu_group:
>                      return(0)
> +                 
>              return(1) 
>      except Exception, details:
>          print "Exception in validate_cpugrp_map: ", details
> @@ -540,6 +606,53 @@ def validate_cpu_consolidation(work_ld, 
>          print "Exception in validate_cpu_consolidation: ", details
>          sys.exit(1)
> 
> +def get_cpuid_max_intr_count():
> +    '''Return the cpu id's of two cpu's with highest number of intr'''
> +    try:
> +        highest = 0
> +        second_highest = 0
> +        global cpu1_max_intr, cpu2_max_intr
> +        #Skipping CPU0 as it is generally high
> +        for i in range(1, cpu_count):
> +            if int(intr_stop[i]) > int(highest):
> +                if highest != 0:
> +                    second_highest = highest
> +                    cpu2_max_intr = cpu1_max_intr
> +                highest = int(intr_stop[i])
> +                cpu1_max_intr = i
> +            else:
> +                if int(intr_stop[i]) > int(second_highest):
> +                    second_highest = int(intr_stop[i])
> +                    cpu2_max_intr = i
> +        for i in range(1, cpu_count):
> +            if i != cpu1_max_intr and i != cpu2_max_intr:
> +                diff = second_highest - intr_stop[i]
> +                ''' Threshold of difference has to be manipulated with multiple test'''
> +                if diff < 10000:
> +                    print "INFO: Difference in interrupt count is below threshold"
> +                    return 1
> +        print "INFO: Interrupt count in other CPU's low as expected"
> +        return 0 
> +    except Exception, details:
> +        print "Exception in get_cpuid_max_intr_count: ", details
> +        sys.exit(1)
> +  
> +def validate_ilb (sched_mc_level, sched_smt_level):
> +    ''' Validate if ilb is running in same package where work load is running
> +    '''
> +    try:
> +        status = get_cpuid_max_intr_count()
> +        if status == 1:
> +            return 1
> +        for pkg in sorted(cpu_map.keys()):
> +            if cpu1_max_intr in cpu_map[pkg] and cpu2_max_intr in cpu_map[pkg]:
> +                return 0
> +        print "INFO: CPUs with higher interrupt count is not in same package"
> +        return 1
> +    except Exception, details:
> +        print "Exception in validate_ilb: ", details
> +        sys.exit(1)
> +    
>  def reset_schedmc():
>      ''' Routine to reset sched_mc_power_savings to Zero level
>      '''
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [LTP] [Patch 5/8] Modified library functions based on review comments
  2009-08-28 10:15 ` [LTP] [Patch 5/8] Modified library functions based on review comments Poornima Nayak
@ 2009-08-30 17:36   ` Subrata Modak
  0 siblings, 0 replies; 16+ messages in thread
From: Subrata Modak @ 2009-08-30 17:36 UTC (permalink / raw)
  To: Poornima Nayak; +Cc: ltp-list, arun, svaidy, ego

On Fri, 2009-08-28 at 15:45 +0530, Poornima Nayak wrote: 
> Incorporated Garrett Cooper's comments & hence modified code
> 
> Signed-off-by: poornima nayak <mpnayak@linux.vnet.ibm.com>

Ok.

> 
> diff -uprN ltp_orig/testcases/kernel/power_management/pm_include.sh ltp/testcases/kernel/power_management/pm_include.sh
> --- ltp_orig/testcases/kernel/power_management/pm_include.sh	2009-08-28 10:54:59.000000000 +0530
> +++ ltp/testcases/kernel/power_management/pm_include.sh	2009-08-28 12:34:00.000000000 +0530
> @@ -9,20 +9,23 @@ MISSING_FILE=3
>  UNTESTED=4
>  YES=0
> 
> -function cleanup() {
> +cleanup() {
>  	if [ -f ${1} ] ; then
>  		rm -f ${1}
>  	fi
>  }
> -function check_config_options() {
> +
> +check_config_options() {
>  	if ( ! ${3} "${1}" ${2} | grep -v "#" > /dev/null ) ; then
>  		echo "NOSUPPORT: current system dosen't support ${1}"
>  	fi
>  }
> -function no_of_cpus() {
> +
> +no_of_cpus() {
>  	echo $(cat /proc/cpuinfo | grep processor | wc -l)
>  }
> -function get_topology() {
> +
> +get_topology() {
>  	declare -a cpus
>  	declare -a phyid
> 
> @@ -43,7 +46,8 @@ function get_topology() {
>  		(( j+=1 ))
>  	done
>  }
> -function check_cpufreq() {
> +
> +check_cpufreq() {
>  	total_cpus=$(no_of_cpus)
>  	(( total_cpus-=1 ))
> 
> @@ -55,24 +59,22 @@ function check_cpufreq() {
>  		fi
>  	done
>  }
> -function get_supporting_freq() {
> +
> +get_supporting_freq() {
>  	cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_frequencies | uniq	
>  }
> -function get_supporting_govr() {
> +
> +get_supporting_govr() {
>  	cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors | uniq
>  }
> 
> -function is_hyper_threaded() {
> +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 -eq $cpu_cores ]; then
> -		return 1
> -	else
> -		return 0
> -	fi
> +	[ $siblins > $cpu_cores ]; return $?
>  }
> 
> -function check_input() {
> +check_input() {
>  	validity_check=${2:-valid}
>  	testfile=$3
>  	if [ "${validity_check}" = "invalid" ] ; then
> @@ -103,61 +105,39 @@ function check_input() {
>  	return $RC
>  }
> 
> -function is_multi_socket() {
> +is_multi_socket() {
>  	no_of_sockets=`cat /sys/devices/system/cpu/cpu?/topology/physical_package_id | uniq | wc -l`
> -	if [ $no_of_sockets -gt 1 ] ; then
> -		return 0
> -	else
> -		return 1
> -	fi
> +	[ $no_of_sockets -gt 1 ] ; return $?
>  }
> 
> -function is_multi_core() {
> +is_multi_core() {
>  	siblings=`cat /proc/cpuinfo | grep siblings | uniq | cut -f2 -d':'`
>  	cpu_cores=`cat /proc/cpuinfo | grep "cpu cores" | uniq | cut -f2 -d':'`
> -	echo "siblings count $siblings cores count $cpu_cores"
>  	if [ $siblings -eq $cpu_cores ]; then
> -		if [ $cpu_cores -gt 1 ]; then
> -			return 0
> -		else
> -			return 1
> -		fi
> +		[ $cpu_cores -gt 1 ]; return $?
>  	else
>  		: $(( num_of_cpus = siblings / cpu_cores ))
> -		if [ $num_of_cpus -gt 1 ]; then
> -			return 0
> -		else
> -			return 1
> -		fi
> +		[ $num_of_cpus -gt 1 ]; return $?
>  	fi
>  }		
> 
> -function is_dual_core() {
> +is_dual_core() {
>  	siblings=`cat /proc/cpuinfo | grep siblings | uniq | cut -f2 -d':'`
>          cpu_cores=`cat /proc/cpuinfo | grep "cpu cores" | uniq | cut -f2 -d':'`
>          if [ $siblings -eq $cpu_cores ]; then
> -                if [ $cpu_cores -eq 2 ]; then
> -                        return 1
> -                else
> -                        return 0
> -                fi
> +                [ $cpu_cores -eq 2 ]; return $?
>          else
>                  : $(( num_of_cpus = siblings / cpu_cores ))
> -                if [ $num_of_cpus -eq 2 ]; then
> -                        echo "number of cpus $num_of_cpus"
> -                        return 1
> -                else
> -                        return 0
> -                fi
> +                [ $num_of_cpus -eq 2 ]; return $?
>          fi
>  }
> 
> -function get_kernel_version() {
> +get_kernel_version() {
>  	# Get kernel minor version
>  	export kernel_version=`uname -r | awk -F. '{print $1"."$2"."$3}' | cut -f1 -d'-'`
>  }
> 
> -function get_valid_input() {
> +get_valid_input() {
>  	kernel_version=$1
>  	case "$kernel_version" in
>  	'2.6.26' | '2.6.27' | '2.6.28')
> @@ -166,22 +146,14 @@ function get_valid_input() {
>  	esac
>  }
>  		
> -function check_supp_wkld() {
> +check_supp_wkld() {
>  	sched_mcsmt=$1
>  	work_load=$2
> 
>  	case "$sched_mcsmt" in
> -		1) if [ "$work_load" == "ebizzy" ]; then
> -				return 0
> -			else
> -				return 1
> -			fi
> +		1) [ "$work_load" == "ebizzy" ]; return $?
>  			;;
> -		2) if [ "$work_load" == "ebizzy" -o "$work_load" == "kernbench" ]; then
> -                return 0
> -            else
> -                return 1
> -            fi
> +		2) [ "$work_load" == "ebizzy" -o "$work_load" == "kernbench" ]; return $?
>              ;;
>  		*) 
>                 return 1
> @@ -189,7 +161,7 @@ function check_supp_wkld() {
>  	esac
>  }
> 
> -function analyze_wrt_workload_hyperthreaded() {
> +analyze_wrt_workload_hyperthreaded() {
>  	sched_mc=$1
>      work_load=$2
>      pass_count=$3
> @@ -223,7 +195,7 @@ unsupported workload $work_load when sch
>          esac
>  }
> 
> -function analyze_wrt_wkld() {
> +analyze_wrt_wkld() {
>  	sched_mc=$1
>      work_load=$2
>      pass_count=$3
> @@ -257,7 +229,7 @@ unsupported workload $work_load when sch
>  	fi
>  }
> 
> -function analyze_result_hyperthreaded() {
> +analyze_result_hyperthreaded() {
>  	sched_mc=$1
>      work_load=$2
>      pass_count=$3
> @@ -299,13 +271,12 @@ $sched_mc for workload=$work_load"
>  	esac
>  }
> 
> -function analyze_package_consolidation_result() {
> +analyze_package_consolidation_result() {
>  	sched_mc=$1
>      work_load=$2
>      pass_count=$3
>  	sched_smt=$4
> 
> -	echo "sched mc $sched_mc sched smt is $sched_smt workload $work_load pass count $pass_count"
>  	if [ $hyper_threaded -eq $YES ]; then
>  		analyze_result_hyperthreaded $sched_mc $work_load $pass_count $sched_smt
>  	else
> @@ -326,7 +297,7 @@ $sched_mc for workload=$work_load"
>  	fi
>  }
> 
> -function analyze_core_consolidation_result() {
> +analyze_core_consolidation_result() {
>  	sched_smt=$1
>  	work_load=$2
>  	pass_count=$3
> @@ -353,7 +324,7 @@ unsupported workload $work_load when sch
>  	esac
>  }
> 
> -function analyze_sched_domain_result(){
> +analyze_sched_domain_result(){
>  	sched_mc=$1
>  	result=$2
>  	sched_smt=$3
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [LTP] [Patch 6/8] Included new function to check feature versus kernel version
  2009-08-28 10:15 ` [LTP] [Patch 6/8] Included new function to check feature versus kernel version Poornima Nayak
@ 2009-08-30 17:36   ` Subrata Modak
  0 siblings, 0 replies; 16+ messages in thread
From: Subrata Modak @ 2009-08-30 17:36 UTC (permalink / raw)
  To: Poornima Nayak; +Cc: ltp-list, svaidy, ego, arun

On Fri, 2009-08-28 at 15:45 +0530, Poornima Nayak wrote: 
> Included new function to check feature versus kernel version
> 
> Signed-off-by: poornima nayak <mpnayak@linux.vnet.ibm.com>

Ok.

> 
> diff -uprN ltp_orig/testcases/kernel/power_management/check_kv_arch.c ltp/testcases/kernel/power_management/check_kv_arch.c
> --- ltp_orig/testcases/kernel/power_management/check_kv_arch.c	2009-08-28 10:54:59.000000000 +0530
> +++ ltp/testcases/kernel/power_management/check_kv_arch.c	2009-08-28 12:36:07.000000000 +0530
> @@ -23,6 +23,12 @@ int kernel_is_too_old(void) {
>  	return 0;
>  }
> 
> +int check_timer_migr_supp(void) {
> +	if (tst_kvercmp(2,6,31) < 0)
> +		return 1;
> +	return 0;
> +}
> +
>  /*
>   * yeah, to make the makefile coding easier, do_check returns
>   * 1 if unshare is not supported, 0 if it is
> @@ -35,7 +41,17 @@ int do_check(void) { return kernel_is_to
>  int do_check(void) { return 1; }
>  #endif
> 
> -int main() {
> -	return do_check();
> +int main(int argc, char *argv[]) {
> +	char feature[20];
> +	if (argc == 1) 
> +		return do_check();
> +	else
> +	{
> +		printf("argument is %s", argv[1]);
> +		if (strcmp(argv[1], "timer_migration")==0)
> +			if (check_timer_migr_supp() == 0)
> +				return 0;
> +			else
> +				return 1;
> +	} 
>  }
> -
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [LTP] [Patch 7/8] Patch for cpu_consolidation to incorporate changes in reusable function
  2009-08-28 10:15 ` [LTP] [Patch 7/8] Patch for cpu_consolidation to incorporate changes in reusable function Poornima Nayak
@ 2009-08-30 17:36   ` Subrata Modak
  0 siblings, 0 replies; 16+ messages in thread
From: Subrata Modak @ 2009-08-30 17:36 UTC (permalink / raw)
  To: Poornima Nayak; +Cc: ltp-list, arun, svaidy, ego

On Fri, 2009-08-28 at 15:45 +0530, Poornima Nayak wrote: 
> Patch for cpu_consolidation to incorporate changes in reusable function
> 
> Signed-off-by: poornima nayak <mpnayak@linux.vnet.ibm.com>

Fine.

> 
> diff -uprN ltp_orig/testcases/kernel/power_management/cpu_consolidation.py ltp/testcases/kernel/power_management/cpu_consolidation.py
> --- ltp_orig/testcases/kernel/power_management/cpu_consolidation.py	2009-08-28 10:54:59.000000000 +0530
> +++ ltp/testcases/kernel/power_management/cpu_consolidation.py	2009-08-28 12:17:34.000000000 +0530
> @@ -43,7 +43,8 @@ def main(argv=None):
>          print "INFO: Created table mapping cpu to package"
>          background="no"
>          duration=60
> -        trigger_workld(options.work_ld, options.stress, duration, background)
> +        pinned ="no"
> +        trigger_workld(options.work_ld, options.stress, duration, background, pinned)
>          generate_report()
>          status = validate_cpu_consolidation(options.work_ld,options.mc_level, options.smt_level)
>          reset_schedmc()
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [LTP] [Patch 8/8]Patch to modify Readme file as new functionality testcase is integrated
  2009-08-28 10:15 ` [LTP] [Patch 8/8]Patch to modify Readme file as new functionality testcase is integrated Poornima Nayak
@ 2009-08-30 17:37   ` Subrata Modak
  0 siblings, 0 replies; 16+ messages in thread
From: Subrata Modak @ 2009-08-30 17:37 UTC (permalink / raw)
  To: Poornima Nayak; +Cc: ltp-list, svaidy, ego, arun

On Fri, 2009-08-28 at 15:45 +0530, Poornima Nayak wrote: 
> Updated Readme w.r.t new testcases
> 
> Signed-off-by: poornima nayak <mpnayak@linux.vnet.ibm.com>

Last one also through.

Regards--
Subrata

> 
> diff -uprN ltp_orig/testcases/kernel/power_management/README ltp/testcases/kernel/power_management/README
> --- ltp_orig/testcases/kernel/power_management/README	2009-08-28 10:54:59.000000000 +0530
> +++ ltp/testcases/kernel/power_management/README	2009-08-28 12:31:08.000000000 +0530
> @@ -82,3 +82,6 @@ To run cpu consolidation test user has t
>  Refer to README in LTPROOT/utils/benchmark/ebizzy-0.2 directory for details of ebizzy.
> 
>  To test CPU consolidation for sched_mc 2 kernbench has to run. Kernbench needs linux kernel source as input in /root directory . For example download from http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.29.4.tar.bz2. If Linux kernel source not found kernbench wiil  not execute.
> +CPU consolidation testcases will not execute if number of CPU's in package is less then 2. If system is hyper threaded but number of CPU is 1 only sched_smt testcases will be excuted. For better coverage of testcases select a system which is atleast quad core and then hyper threaded so that you will observe 8 CPU's in each package.
> +
> +Timer migration interface test will execute on kernel versions 2.6.31 and above. Timer migration functionality verification testcases will be executed only on suitable architecture like quad core or the number of CPU's in each package should be atleast 4 and above
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-08-30 17:38 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-28 10:14 [LTP] [Patch 1/8] New testcase to validate Ideal Load Balancer Functionality Poornima Nayak
2009-08-28 10:14 ` [LTP] [Patch 2/8] Power management master script modified to integrate ILB testcase Poornima Nayak
2009-08-30 17:36   ` Subrata Modak
2009-08-28 10:14 ` [LTP] [Patch 3/8] Patch to integrate ILB testcase to LTP Poornima Nayak
2009-08-30 17:36   ` Subrata Modak
2009-08-28 10:15 ` [LTP] [Patch 4/8] Addional new reusable functions for ILB testing Poornima Nayak
2009-08-30 17:36   ` Subrata Modak
2009-08-28 10:15 ` [LTP] [Patch 5/8] Modified library functions based on review comments Poornima Nayak
2009-08-30 17:36   ` Subrata Modak
2009-08-28 10:15 ` [LTP] [Patch 6/8] Included new function to check feature versus kernel version Poornima Nayak
2009-08-30 17:36   ` Subrata Modak
2009-08-28 10:15 ` [LTP] [Patch 7/8] Patch for cpu_consolidation to incorporate changes in reusable function Poornima Nayak
2009-08-30 17:36   ` Subrata Modak
2009-08-28 10:15 ` [LTP] [Patch 8/8]Patch to modify Readme file as new functionality testcase is integrated Poornima Nayak
2009-08-30 17:37   ` Subrata Modak
2009-08-30 17:36 ` [LTP] [Patch 1/8] New testcase to validate Ideal Load Balancer Functionality Subrata Modak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.