test/power: add delay before checking CPU frequency
authorRichael Zhuang <richael.zhuang@arm.com>
Thu, 15 Apr 2021 05:59:29 +0000 (13:59 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 21 Apr 2021 16:16:15 +0000 (18:16 +0200)
commit00456850be40d8b663d1066763ddedffe4346585
tree8a032acc1761757953ab5d5b8bdc9aebdac1bf77
parent7eff355b6983872ce4d2817ea8017d21320489e1
test/power: add delay before checking CPU frequency

For some platforms the newly-set frequency may not be effective
immediately. If we didn't get the right value from cpuinfo_cur_freq
immediately, add 10ms delay each time before rechecking until
timeout.

From our test, for some arm platforms, it requires up to 700ms when
going from a minimum to a maximum frequency. And it's not the
driver/software issue.

Fixes: ed7c51a6a680 ("app/test: vm power management")
Cc: stable@dpdk.org
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-by: David Hunt <david.hunt@intel.com>
app/test/test_power_cpufreq.c