Skip to content

Commit

Permalink
Fix lkp picking up system's perf and Add new param
Browse files Browse the repository at this point in the history
1) Fix: lkp unable to pick latest perf rather using system's perf as a
   consequence unable to run benchmarks on custom kernels
2) Feat: add new parameter # -thp_opt to enable lkp run two different
   variant of the microbenchmark (thp/no_thp) and lkp ncompare able to
   differentiate the results of the same

Reviewed-by: Srikanth Aithal <[email protected]>
Signed-off-by: Suneeth D <[email protected]>
  • Loading branch information
Suneeth D authored and Suneeth D committed Dec 3, 2024
1 parent 0f898e6 commit ab2da70
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions programs/perf-bench-numa-mem/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ parameters:
nr_processes:
nr_threads:
mem_proc:
thp_opt:
extra_params:

results:
Expand Down
10 changes: 9 additions & 1 deletion programs/perf-bench-numa-mem/run
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# - nr_processes
# - nr_threads
# - mem_proc
# - thp_opt
# - extra_params

## perf began as a tool for using the performance counters
Expand All @@ -11,11 +12,18 @@
. $LKP_SRC/lib/unit.sh
. $LKP_SRC/lib/reproduce-log.sh
. $LKP_SRC/lib/debug.sh
. $LKP_SRC/lib/env.sh

if [ -f /lkp/benchmarks/perf/perf ]; then
set_perf_path "/lkp/benchmarks/perf/perf"
else
set_perf_path "/usr/bin/perf"
fi

[ -n "$nr_processes" ] || nr_processes=$nr_cpu

mb_proc=$(to_mb $mem_proc)

log_cmd numactl --hard || die "Test needs available numa"

log_cmd perf bench numa mem -p $nr_processes -t $nr_threads -m -0 -P $mb_proc $extra_params
log_cmd $perf bench numa mem -p $nr_processes -t $nr_threads -m -0 -P $mb_proc --thp $thp_opt $extra_params

0 comments on commit ab2da70

Please sign in to comment.