From e276abfcb4c99a79f9efb9e27a9b77ccaa9f9fbf Mon Sep 17 00:00:00 2001 From: Brendan Jackman Date: Thu, 20 Apr 2017 15:38:46 +0100 Subject: [PATCH] shutils: Speed up cpuidle_wake_all_cpus This can currently take several hundred milliseconds on slow targets with many CPUs. To speed it up, use '&' to spawn the perturbations in paralell. --- devlib/bin/scripts/shutils.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devlib/bin/scripts/shutils.in b/devlib/bin/scripts/shutils.in index fa4ad93..d44e444 100755 --- a/devlib/bin/scripts/shutils.in +++ b/devlib/bin/scripts/shutils.in @@ -54,7 +54,7 @@ cpufreq_trace_all_frequencies() { cpuidle_wake_all_cpus() { CPU_PATHS=/sys/devices/system/cpu/cpu[0-9]* MASK=0x1; for F in $CPU_PATHS; do - $BUSYBOX taskset $MASK true + $BUSYBOX taskset $MASK true & MASK=$($BUSYBOX printf '0x%x' $((MASK * 2))) done }