From: Pratik Sampat <psampat@linux.ibm.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>,
rjw@rjwysocki.net, mpe@ellerman.id.au, benh@kernel.crashing.org,
paulus@samba.org, srivatsa@csail.mit.edu, shuah@kernel.org,
npiggin@gmail.com, ego@linux.vnet.ibm.com, svaidy@linux.ibm.com,
pratik.r.sampat@gmail.com, linux-pm@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v3 0/2] Selftest for cpuidle latency measurement
Date: Wed, 22 Jul 2020 21:03:20 +0530 [thread overview]
Message-ID: <ea27fd11-43c3-ac3e-5913-692fdcd483e9@linux.ibm.com> (raw)
In-Reply-To: <17e884b8-09d8-98a8-3890-bf506d2cdfca@linaro.org>
Hello Daniel,
On 21/07/20 8:27 pm, Daniel Lezcano wrote:
> On 21/07/2020 14:42, Pratik Rajesh Sampat wrote:
>> v2: https://lkml.org/lkml/2020/7/17/369
>> Changelog v2-->v3
>> Based on comments from Gautham R. Shenoy adding the following in the
>> selftest,
>> 1. Grepping modules to determine if already loaded
>> 2. Wrapper to enable/disable states
>> 3. Preventing any operation/test on offlined CPUs
>> ---
>>
>> The patch series introduces a mechanism to measure wakeup latency for
>> IPI and timer based interrupts
>> The motivation behind this series is to find significant deviations
>> behind advertised latency and resisdency values
> Why do you want to measure for the timer and the IPI ? Whatever the
> source of the wakeup, the exit latency remains the same, no ?
>
> Is all this kernel-ish code really needed ?
>
> What about using a highres periodic timer and make it expires every eg.
> 50ms x 2400, so it is 120 secondes and measure the deviation. Repeat the
> operation for each idle states.
>
> And in order to make it as much accurate as possible, set the program
> affinity on a CPU and isolate this one by preventing other processes to
> be scheduled on and migrate the interrupts on the other CPUs.
>
> That will be all userspace code, no?
>
>
The kernel module may not needed now that you mention it.
IPI latencies could be measured using pipes and threads using
pthread_attr_setaffinity_np to control the experiment, as you
suggested. This should internally fire a smp_call_function_single.
The original idea was to essentially measure it as closely as possible
in the kernel without involving the kernel-->userspace overhead.
However, the user-space approach may not be too much of a problem as
we are collecting a baseline and the delta of the latency is what we
would be concerned about anyways!
With respect to measuring both timers and IPI latencies: In principle
yes, the exit latency should remain the same but if there is a
deviation in reality we may want to measure it.
I'll implement this experiment in the userspace and get back with the
numbers to confirm.
Thanks for your comments!
Best,
Pratik
>
>
prev parent reply other threads:[~2020-07-22 15:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 12:42 [PATCH v3 0/2] Selftest for cpuidle latency measurement Pratik Rajesh Sampat
2020-07-21 12:42 ` [PATCH v3 1/2] cpuidle: Trace IPI based and timer based wakeup latency from idle states Pratik Rajesh Sampat
2020-07-27 13:42 ` Rafael J. Wysocki
2020-07-28 13:30 ` Pratik Sampat
2020-07-21 12:43 ` [PATCH v3 2/2] selftest/cpuidle: Add support for cpuidle latency measurement Pratik Rajesh Sampat
2020-07-21 14:57 ` [PATCH v3 0/2] Selftest " Daniel Lezcano
2020-07-22 15:33 ` Pratik Sampat [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ea27fd11-43c3-ac3e-5913-692fdcd483e9@linux.ibm.com \
--to=psampat@linux.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=daniel.lezcano@linaro.org \
--cc=ego@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=paulus@samba.org \
--cc=pratik.r.sampat@gmail.com \
--cc=rjw@rjwysocki.net \
--cc=shuah@kernel.org \
--cc=srivatsa@csail.mit.edu \
--cc=svaidy@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).