DEBUG: irqchip: Add an IRQ prod
TODO: align DT and ACPI faff
This can be used with a script like so, which yields one file per
iteration (counting IRQ counts) in the current directory.
get_irq_count () {
cat /proc/interrupts | grep irq-prod | awk '{ print $2; }'
}
for f in $(find /sys/devices/system/cpu/cpufreq/ -name "policy*"); do
echo "performance" > "$f"/scaling_governor
done
KTHREAD_PID=$(ps -aux | grep irq-prod/ | head -n 1 | awk '{ print $2; }')
taskset -pc 0 $KTHREAD_PID
for ((i=0; i < 20; i++)); do
base_val=$(get_irq_count)
now=$(date +%s%3N)
echo 1 > /sys/kernel/irq_prod/active
sleep 5
echo 0 > /sys/kernel/irq_prod/active
end=$(date +%s%3N)
end_val=$(get_irq_count)
delta=$((end_val - base_val))
duration=$((end - now))
echo $((delta / (duration / 1000))) > ./$i
done
Signed-off-by:
Valentin Schneider <valentin.schneider@arm.com>
Loading
Please register or sign in to comment