lkml.org 
[lkml]   [2021]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC v4 2/2] selftest/cpuidle: Add support for cpuidle latency measurement
Hi Pratik,

On Mon, Apr 12, 2021 at 12:43 AM Pratik Rajesh Sampat
<psampat@linux.ibm.com> wrote:
>
> The cpuidle latency selftest provides support to systematically extract,
> analyse and present IPI and timer based wakeup latencies for each CPU
> and each idle state available on the system.
>
> The selftest leverages test-cpuidle_latency module's debugfs interface
> to interact and extract latency information from the kernel.
>
> The selftest inserts the module if already not inserted, disables all
> the idle states and enables them one by one testing the following:
> 1. Keeping source CPU constant, iterate through all the CPUS measuring
> IPI latency for baseline (CPU is busy with cat /dev/random > /dev/null
> workload) and then when the CPU is allowed to be at rest
> 2. Iterating through all the CPUs, sending expected timer durations to
> be equivalent to the residency of the deepest idle state enabled
> and extracting the difference in time between the time of wakeup and
> the expected timer duration
>
> The timer based test produces run to run variance on some intel based
> systems that sport a mechansim "C-state pre-wake" which can
> pre-wake a CPU from an idle state when timers are armed. For systems and
> architectures that don't have this mechansim can leverage timer tests
> with the -i option.
>
> To run this test specifically:
> $ sudo make -C tools/testing/selftests TARGETS="cpuidle" run_tests
>
> There are a few optional arguments too that the script can take
> [-h <help>]
> [-i <run timer tests>]
> [-m <location of the module>]
> [-o <location of the output>]
> [-v <verbose> (run on all cpus)]
> Default Output location in: tools/testing/selftest/cpuidle/cpuidle.log
>
> To run the test without re-compiling:
> $ cd tools/testing/selftest/cpuidle/
> $ sudo ./cpuidle.sh
>
> Signed-off-by: Pratik Rajesh Sampat <psampat@linux.ibm.com>

Reviewed-by: Doug Smythies <dsmythies@telus.net>
...

\
 
 \ /
  Last update: 2021-04-25 22:50    [W:0.055 / U:5.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site