Skip to content

Commit

Permalink
Revert "will-it-scale: update package and add affinity parameter"
Browse files Browse the repository at this point in the history
This reverts commit cf79c4f.

/result/will-it-scale/performance-thread-100%-tlb_flush3-ucode=0x16/lkp-hsw-4ex1/debian-10.4-x86_64-20200603.cgz/x86_64-rhel-8.3/gcc-9/6efb943b8616ec53a5e444193dccf1af9ad627b5/3$ cat stderr
Events disabled
Traceback (most recent call last):
  File "./runtest.py", line 58, in <module>
    affinity = sys.argv[5]
IndexError: list index out of range

Signed-off-by: Philip Li <[email protected]>
  • Loading branch information
rli9 committed Nov 24, 2021
1 parent 1da6448 commit 85d96a3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
21 changes: 8 additions & 13 deletions pkg/will-it-scale/will-it-scale.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,16 @@ From: root <[email protected]>
Date: Thu, 21 May 2020 12:50:09 +0800
Subject: [PATCH] update runtest.py

* 2021/11, add 'affinity' parameter

Signed-off-by: root <[email protected]>
Signed-off-by: Feng Tang <[email protected]>

---
runtest.py | 83 +++++++++++++++++++++++++++---------------------------
1 file changed, 42 insertions(+), 41 deletions(-)
runtest.py | 82 +++++++++++++++++++++++++++++++-------------------------------
1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/runtest.py b/runtest.py
index 8bda393..6b14675 100755
index 8bda393..de4271a 100755
--- a/runtest.py
+++ b/runtest.py
@@ -48,12 +48,14 @@ class linux_stat():
@@ -48,12 +48,13 @@ class linux_stat():
return 1.0 * idle / (idle + busy)


Expand All @@ -31,11 +27,10 @@ index 8bda393..6b14675 100755
+duration = int(sys.argv[2])
+mode = sys.argv[3]
+threads = sys.argv[4:]
+affinity = sys.argv[5]

nr_cores=0
r = re.compile('^processor')
@@ -87,43 +89,42 @@ if arch == 'ppc64':
@@ -87,43 +88,42 @@ if arch == 'ppc64':
print('tasks,processes,processes_idle,threads,threads_idle,linear')
print('0,0,100,0,100,0')

Expand Down Expand Up @@ -82,7 +77,7 @@ index 8bda393..6b14675 100755
+ processes_avg = 0
+ processes_idle = 0
+ if mode == 'process' or mode == 'both':
+ c = './%s_processes -t %d -s %d %s ' % (cmd, i, duration, affinity)
+ c = './%s_processes -t %d -s %d' % (cmd, i, duration)
+ before = linux_stat()
+ pipe = subprocess.Popen(setarch + ' ' + c, shell=True, stdout=subprocess.PIPE, text=True).stdout
+ for line in pipe.readlines():
Expand All @@ -102,7 +97,7 @@ index 8bda393..6b14675 100755
+ threads_avg = 0
+ threads_idle = 0
+ if mode == 'thread' or mode == 'both':
+ c = './%s_threads -t %d -s %d %s ' % (cmd, i, duration, affinity)
+ c = './%s_threads -t %d -s %d' % (cmd, i, duration)
+ before = linux_stat()
+ pipe = subprocess.Popen(setarch + ' ' + c, shell=True, stdout=subprocess.PIPE, text=True).stdout
+ for line in pipe.readlines():
Expand All @@ -116,5 +111,5 @@ index 8bda393..6b14675 100755
if i == 1:
linear = max(processes_avg, threads_avg)
--
2.27.0
2.11.0

6 changes: 1 addition & 5 deletions tests/will-it-scale
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# - test
# - mode
# - nr_task
# - no_affinity /* Do not do the CPU bindings for test tasks */

## It Scale takes a testcase and runs it from 1 through to n
## parallel copies to see if the testcase will scale. It
Expand Down Expand Up @@ -33,9 +32,6 @@ else
setup_params
fi

affinity_config=" "
[ -n "$no_affinity" ] && affinity_config=" -n "

ulimit -n 65536

log_cmd /lkp/benchmarks/python3/bin/python3 ./runtest.py $test $duration $mode $threads_to_iterate $affinity_config
log_cmd /lkp/benchmarks/python3/bin/python3 ./runtest.py $test $duration $mode $threads_to_iterate

0 comments on commit 85d96a3

Please sign in to comment.