diff options
Diffstat (limited to 'recipes-kernel/cryptodev/sdk_patches/0060-more-precision-in-running-mpstat.patch')
| -rw-r--r-- | recipes-kernel/cryptodev/sdk_patches/0060-more-precision-in-running-mpstat.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/recipes-kernel/cryptodev/sdk_patches/0060-more-precision-in-running-mpstat.patch b/recipes-kernel/cryptodev/sdk_patches/0060-more-precision-in-running-mpstat.patch new file mode 100644 index 000000000..ae749bdca --- /dev/null +++ b/recipes-kernel/cryptodev/sdk_patches/0060-more-precision-in-running-mpstat.patch | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | From 26291db7df602d3d3d5601817229822b13904fe9 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Cristian Stoica <cristian.stoica@nxp.com> | ||
| 3 | Date: Wed, 26 Oct 2016 09:48:44 +0300 | ||
| 4 | Subject: [PATCH 060/104] more precision in running mpstat | ||
| 5 | |||
| 6 | Start mpstat one second later than the tests so we don't measure | ||
| 7 | transient issues. Likewise, stop mpstat just before the tests terminate | ||
| 8 | so we don't record incorrect CPU idle. | ||
| 9 | |||
| 10 | Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com> | ||
| 11 | --- | ||
| 12 | tests/async_speed_multi.sh | 6 +++--- | ||
| 13 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/tests/async_speed_multi.sh b/tests/async_speed_multi.sh | ||
| 16 | index a28f72d..5268c86 100755 | ||
| 17 | --- a/tests/async_speed_multi.sh | ||
| 18 | +++ b/tests/async_speed_multi.sh | ||
| 19 | @@ -22,7 +22,6 @@ | ||
| 20 | NUM_CORES=`nproc` | ||
| 21 | OUT_BASENAME="async_speed" | ||
| 22 | S_TIME_FORMAT=ISO | ||
| 23 | -MPSTAT="mpstat" | ||
| 24 | MPSTAT_OUT="mpstat_out" | ||
| 25 | |||
| 26 | function usage | ||
| 27 | @@ -47,7 +46,6 @@ function get_cpu_idle | ||
| 28 | { | ||
| 29 | header_line=`grep %idle ${MPSTAT_OUT} | head -n 1 | sed 's/\s\+/ /g'` | ||
| 30 | idle_column=`echo $header_line | wc -w` | ||
| 31 | - | ||
| 32 | average_idle=`grep Average ${MPSTAT_OUT} | sed 's/\s\+/ /g' | cut -d' ' -f ${idle_column} | tail -n 1` | ||
| 33 | |||
| 34 | echo $average_idle | ||
| 35 | @@ -63,7 +61,7 @@ function run_parallel | ||
| 36 | echo "Running $mvalue threads in parallel:" | ||
| 37 | echo " $CMD" | ||
| 38 | |||
| 39 | - $MPSTAT 1 $(($tvalue-1)) &> $MPSTAT_OUT & | ||
| 40 | + (sleep 1; mpstat 1 $(($tvalue-2))) &> $MPSTAT_OUT & | ||
| 41 | MPSTAT_PID=$! | ||
| 42 | |||
| 43 | PIDS="" | ||
| 44 | @@ -126,6 +124,8 @@ function main | ||
| 45 | [ -z "$mvalue" ] && mvalue=`nproc` # thread count defaults to nproc | ||
| 46 | [ -z "$nvalue" ] && nvalue=256 # 256 bytes default buffer size | ||
| 47 | |||
| 48 | + [ "$tvalue" -lt 5 ] && tvalue=5 | ||
| 49 | + | ||
| 50 | case "$alg_name" in | ||
| 51 | "null" |\ | ||
| 52 | "aes-128-cbc" |\ | ||
| 53 | -- | ||
| 54 | 2.10.2 | ||
| 55 | |||
