# @name Worstcase Latency with PCI IO load on isolated core by using cyclictest
# @desc Measure latency under PCI IO load on isolated core using cyclictest
# @requires (pci || pcie) && smp
# @setup_requires pcisatacard

REALTIME_S_PERF_SHIELD_SMP_PCI source 'functions.sh'; shield_shell; max_id=`cat /sys/devices/system/cpu/online | cut -d '-' -f 2`; source 'board_requirements.sh'; latency=`get_acceptable_latency pci`; multi_run_processes.sh -s "timeout 360 -s 9 sh -c '${LTPROOT}/runltp -P $PLATFORM -f ddt/pci_sata_perf -s PCI_L_PERF_SATA_EXT2_100M'  || true" -l "-n 1" -s "run_cyclictest $latency -a$max_id -t1 -i200 -p98 -m -n -q -D 5m" -l "-n 1"

REALTIME_L_PERF_SHIELD_SMP_PCI source 'functions.sh'; shield_shell; max_id=`cat /sys/devices/system/cpu/online | cut -d '-' -f 2`; source 'board_requirements.sh'; latency=`get_acceptable_latency pci`; multi_run_processes.sh -s "timeout 14440 -s 9 sh -c 'while true; do ${LTPROOT}/runltp -P $PLATFORM -f ddt/pci_sata_perf -s PCI_L_PERF_SATA_EXT2_100M; done'  || true" -l "-n 1" -s "run_cyclictest $latency -a$max_id -t1 -i200 -p98 -m -n -q -D 4h" -l "-n 1"
