diff --git a/benchmarks/lockhammer/scripts/lh_sweepdelay_cfg.yaml b/benchmarks/lockhammer/scripts/lh_sweepdelay_cfg.yaml new file mode 100644 index 0000000..eb52826 --- /dev/null +++ b/benchmarks/lockhammer/scripts/lh_sweepdelay_cfg.yaml @@ -0,0 +1,157 @@ +# Copyright (c) 2018, ARM Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# Redistributions in binary form must reproduce the above copyright notice, this +# list of conditions and the following disclaimer in the documentation and/or +# other materials provided with the distribution. +# +# Neither the name of ARM Limited nor the names of its contributors may be used +# to endorse or promote products derived from this software without specific +# prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# The views and conclusions contained in the software and documentation are those +# of the authors and should not be interpreted as representing official policies, +# either expressed or implied, of this project. + + +## Global Settings +globalcfg: + execdir: ../build + logfile: lockhammer.csv + + +## Sweep Test Settings +# +# Common assumptions for sweep delay test: +# The system should be able to handle CAS workload at any delay. +# Using eBPF, we find that Nginx lockref inter-arrival delay is less than 32us, +# and lockref_get to lockref_put_return delay is less than 2us. Therefore we +# create this script to sweep <32us delay using -p parameter and keep -c +# parameter at 1us because eBPF intrinsic overhead is about 1us. We also find +# the ratio between -c and -p is relatively fixed, e.g. 1:8 ~ 1:16. We choose +# 1:9 for the last case (-c=3000ns, -p=28000ns). +# +## +sweeptest: + enabled: True + safemode: True + cmd: + - lh_cas_lockref + cmd_aarch64: + cmd_x86_64: + repeat: 9 + sweepargu: t + argumax: 0 + skipsince: 48 + skipstep: 8 + argulist: + - a: 5000 + c: 0ns + p: 0ns + o: lstopo + - a: 5000 + c: 200ns + p: 0ns + o: lstopo + - a: 5000 + c: 1000ns + p: 0ns + o: lstopo + - a: 5000 + c: 200ns + p: 1000ns + o: lstopo + - a: 5000 + c: 1000ns + p: 1000ns + o: lstopo + - a: 5000 + c: 1000ns + p: 2000ns + o: lstopo + - a: 5000 + c: 1000ns + p: 3000ns + o: lstopo + - a: 5000 + c: 1000ns + p: 4000ns + o: lstopo + - a: 5000 + c: 1000ns + p: 5000ns + o: lstopo + - a: 5000 + c: 1000ns + p: 6000ns + o: lstopo + - a: 5000 + c: 1000ns + p: 7000ns + o: lstopo + - a: 5000 + c: 1000ns + p: 8000ns + o: lstopo + - a: 5000 + c: 1000ns + p: 9000ns + o: lstopo + - a: 5000 + c: 1000ns + p: 10000ns + o: lstopo + - a: 5000 + c: 1000ns + p: 11000ns + o: lstopo + - a: 5000 + c: 1000ns + p: 12000ns + o: lstopo + - a: 5000 + c: 1000ns + p: 13000ns + o: lstopo + - a: 5000 + c: 1000ns + p: 14000ns + o: lstopo + - a: 5000 + c: 1000ns + p: 15000ns + o: lstopo + - a: 5000 + c: 1000ns + p: 16000ns + o: lstopo + - a: 5000 + c: 2000ns + p: 20000ns + o: lstopo + - a: 5000 + c: 2000ns + p: 24000ns + o: lstopo + - a: 5000 + c: 3000ns + p: 28000ns + o: lstopo diff --git a/benchmarks/lockhammer/scripts/run_sweep_delay.sh b/benchmarks/lockhammer/scripts/run_sweep_delay.sh new file mode 100755 index 0000000..f22f128 --- /dev/null +++ b/benchmarks/lockhammer/scripts/run_sweep_delay.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Copyright (c) 2017, The Linux Foundation. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of The Linux Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +nohup sudo ./test_lockhammer.py lh_sweepdelay_cfg.yaml &