[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAYoRsXhH3d8AwBgHD1kyWjw2GUvMQ42br72CfjHTx6NSYKp6w@mail.gmail.com>
Date: Sun, 25 Apr 2021 13:49:32 -0700
From: Doug Smythies <dsmythies@...us.net>
To: Pratik Rajesh Sampat <psampat@...ux.ibm.com>
Cc: rjw@...ysocki.net, Daniel Lezcano <daniel.lezcano@...aro.org>,
shuah@...nel.org, ego@...ux.vnet.ibm.com, svaidy@...ux.ibm.com,
Linux PM list <linux-pm@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-kselftest@...r.kernel.org, pratik.r.sampat@...il.com,
dsmythies <dsmythies@...us.net>
Subject: Re: [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@...ux.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@...ux.ibm.com>
Reviewed-by: Doug Smythies <dsmythies@...us.net>
...
Powered by blists - more mailing lists