New testcase to validate Ideal Load Balancer Functionality
PATCH 1/8 New testcase to validate Ideal Load Balancer Functionality
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
testcases/kernel/power_management/ilb_test.py +57 -0
@@ -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 <[email protected]>" + +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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
PATCH 2/8 Power management master script modified to integrate ILB testcase
Power management master script modified to integrate ILB testcases
testcases/kernel/power_management/runpwtests.sh +56 -2
@@ -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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Re: [LTP] [Patch 2/8] Power management master script modified to integrate ILB testcase
Quoted 3 lines · Poornima Nayak
Power management master script modified to integrate ILB testcases
Signed-off-by poornima nayak <[email protected]>
Ok.
Regards--
Subrata
Quoted 85 lines
diff -uprN
ltp_orig/testcases/kernel/power_management/runpwtests.shltp/testcases/kernel/power_management/runpwtests.shtestcases/kernel/power_management/runpwtests.sh +56
-3@@ -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 ------------------------------------------------------------------------------
Quoted 8 lines
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
[email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
PATCH 3/8 Patch to integrate ILB testcase to LTP
In reply to Poornima NayakPatch to integrate ILB testcase to LTP
testcases/kernel/power_management/Makefile +1 -0
@@ -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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Re: [LTP] [Patch 3/8] Patch to integrate ILB testcase to LTP
Quoted 3 lines · Poornima Nayak
Patch to integrate ILB testcase to LTP
Signed-off-by poornima nayak <[email protected]>
Thanks.
Regards--
Subrata
Quoted 14 lines
diff -uprN ltp_orig/testcases/kernel/power_management/Makefile ltp/testcases/kernel/power_management/Makefile
testcases/kernel/power_management/Makefile +1
-1@@ -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 ------------------------------------------------------------------------------
Quoted 8 lines
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
[email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
PATCH 4/8 Addional new reusable functions for ILB testing
In reply to Poornima NayakDeveloped new functions to support ILB test execution and result verification. Minimal changes has been done for exisitng function to support ILB test execution.
testcases/kernel/power_management/lib/sched_mc.py +123 -10
@@ -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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Re: [LTP] [Patch 4/8] Addional new reusable functions for ILB testing
Quoted 5 lines · Poornima Nayak
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 <[email protected]>
Thanks.
Quoted 232 lines
diff -uprN
ltp_orig/testcases/kernel/power_management/lib/sched_mc.pyltp/testcases/kernel/power_management/lib/sched_mc.pytestcases/kernel/power_management/lib/sched_mc.py +123
-11@@ -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 ''' ------------------------------------------------------------------------------
Quoted 8 lines
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
[email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
PATCH 5/8 Modified library functions based on review comments
In reply to Poornima NayakIncorporated Garrett Cooper's comments & hence modified code
testcases/kernel/power_management/pm_include.sh +35 -64
@@ -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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Re: [LTP] [Patch 5/8] Modified library functions based on review comments
Quoted 3 lines · Poornima Nayak
Incorporated Garrett Cooper's comments & hence modified code
Signed-off-by poornima nayak <[email protected]>
Ok.
Quoted 234 lines
diff -uprN
ltp_orig/testcases/kernel/power_management/pm_include.shltp/testcases/kernel/power_management/pm_include.shtestcases/kernel/power_management/pm_include.sh +35
-65@@ -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 ------------------------------------------------------------------------------
Quoted 8 lines
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
[email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
PATCH 6/8 Included new function to check feature versus kernel version
In reply to Poornima NayakIncluded new function to check feature versus kernel version
testcases/kernel/power_management/check_kv_arch.c +19 -3
@@ -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_toint 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Re: [LTP] [Patch 6/8] Included new function to check feature versus kernel version
Quoted 3 lines · Poornima Nayak
Included new function to check feature versus kernel version
Signed-off-by poornima nayak <[email protected]>
Ok.
Quoted 40 lines
diff -uprN
ltp_orig/testcases/kernel/power_management/check_kv_arch.cltp/testcases/kernel/power_management/check_kv_arch.ctestcases/kernel/power_management/check_kv_arch.c +19
-4@@ -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_toint 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 ; + } } - ------------------------------------------------------------------------------
Quoted 8 lines
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
[email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
PATCH 7/8 Patch for cpu_consolidation to incorporate changes in reusable function
In reply to Poornima NayakPatch for cpu_consolidation to incorporate changes in reusable function
testcases/kernel/power_management/cpu_consolidation.py +2 -1
@@ -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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Re: [LTP] [Patch 7/8] Patch for cpu_consolidation to incorporate changes in reusable function
Quoted 3 lines · Poornima Nayak
Patch for
cpu_consolidationto incorporate changes in reusable functionSigned-off-by poornima nayak <[email protected]>
Fine.
Quoted 16 lines
diff -uprN
ltp_orig/testcases/kernel/power_management/cpu_consolidation.pyltp/testcases/kernel/power_management/cpu_consolidation.pytestcases/kernel/power_management/cpu_consolidation.py +2
-2@@ -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() ------------------------------------------------------------------------------
Quoted 8 lines
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
[email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
PATCH 8/8 Patch to modify Readme file as new functionality testcase is integrated
In reply to Poornima NayakUpdated Readme w.r.t new testcases
testcases/kernel/power_management/README +3 -0
@@ -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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Re: [LTP] [Patch 8/8]Patch to modify Readme file as new functionality testcase is integrated
Quoted 3 lines · Poornima Nayak
Updated Readme w.r.t new testcases
Signed-off-by poornima nayak <[email protected]>
Last one also through.
Regards--
Subrata
Quoted 13 lines
diff -uprN ltp_orig/testcases/kernel/power_management/README ltp/testcases/kernel/power_management/README
testcases/kernel/power_management/README +3
-1@@ -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 ------------------------------------------------------------------------------
Quoted 8 lines
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
[email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 5 lines · Poornima Nayak
New testcase to validate Ideal Load Balancer Functionality.
By default setssched_mc_power_savings&sched_smt_powersavings to the value passed as argument and then triggers kernbench by pinning it to the CPUnSigned-off-by poornima nayak <[email protected]>
Done. Thanks.
Regards--
Subrata
Quoted 64 lines
diff -uprN
ltp_orig/testcases/kernel/power_management/ilb_test.pyltp/testcases/kernel/power_management/ilb_test.pytestcases/kernel/power_management/ilb_test.py +57
-1@@ -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 <[email protected]>" + +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()) ------------------------------------------------------------------------------
Quoted 8 lines
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
[email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list