From: Pratik Sampat <psampat@linux.ibm.com>
To: dedekind1@gmail.com, rjw@rjwysocki.net,
daniel.lezcano@linaro.org, srivatsa@csail.mit.edu,
shuah@kernel.org, npiggin@gmail.com, ego@linux.vnet.ibm.com,
svaidy@linux.ibm.com, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
pratik.r.sampat@gmail.com
Subject: Re: [RFC v4 1/1] selftests/cpuidle: Add support for cpuidle latency measurement
Date: Thu, 3 Sep 2020 17:30:07 +0530 [thread overview]
Message-ID: <fa616fed-66be-bcad-83b8-b1173a3a444f@linux.ibm.com> (raw)
In-Reply-To: <b59481655c29d081eea4f34c00166517738000e5.camel@gmail.com>
Hello Artem,
On 02/09/20 8:55 pm, Artem Bityutskiy wrote:
> On Wed, 2020-09-02 at 17:15 +0530, Pratik Rajesh Sampat wrote:
>> Measure cpuidle latencies on wakeup to determine and compare with the
>> advertsied wakeup latencies for each idle state.
Thank you for pointing me to your talk. It was very interesting!
I certainly did not know about that the Intel architecture being aware
of timers and pre-wakes the CPUs which makes the timer experiment
observations void.
> It looks like the measurements include more than just C-state wake,
> they also include the overhead of waking up the proces, context switch,
> and potentially any interrupts that happen on that CPU. I am not saying
> this is not interesting data, it surely is, but it is going to be
> larger than you see in cpuidle latency tables. Potentially
> significantly larger.
The measurements will definitely include overhead than just the C-State
wakeup.
However, we are also collecting a baseline measurement wherein we run
the same test on a 100% busy CPU and the measurement of latency from
that could be considered to the kernel-userspace overhead.
The rest of the measurements would be considered keeping this baseline
in mind.
> Therefore, I am not sure this program should be advertised as "cpuidle
> measurement". It really measures the "IPI latency" in case of the IPI
> method.
Now with the new found knowledge of timers in Intel, I understand that
this really only seems to measure IPI latency and not timer latency,
although both the observations shouldn't be too far off anyways.
>> A baseline measurement for each case of IPI and timers is taken at
>> 100 percent CPU usage to quantify for the kernel-userpsace overhead
>> during execution.
> At least on Intel platforms, this will mean that the IPI method won't
> cover deep C-states like, say, PC6, because one CPU is busy. Again, not
> saying this is not interesting, just pointing out the limitation.
That's a valid point. We have similar deep idle states in POWER too.
The idea here is that this test should be run on an already idle
system, of course there will be kernel jitters along the way
which can cause little skewness in observations across some CPUs but I
believe the observations overall should be stable.
Another solution to this could be using isolcpus, but that just
increases the complexity all the more.
If you have any suggestions of any other way that could guarantee
idleness that would be great.
>
> I was working on a somewhat similar stuff for x86 platforms, and I am
> almost ready to publish that on github. I can notify you when I do so
> if you are interested. But here is a small presentation of the approach
> that I did on Plumbers last year:
>
> https://youtu.be/Opk92aQyvt0?t=8266
>
> (the link points to the start of my talk)
>
Sure thing. Do notify me when it comes up.
I would be happy to have a look at it.
--
Thanks!
Pratik
next prev parent reply other threads:[~2020-09-03 15:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-02 11:45 [RFC v4 0/1] Selftest for cpuidle latency measurement Pratik Rajesh Sampat
2020-09-02 11:45 ` [RFC v4 1/1] selftests/cpuidle: Add support " Pratik Rajesh Sampat
2020-09-02 15:25 ` Artem Bityutskiy
2020-09-03 12:00 ` Pratik Sampat [this message]
2020-09-03 14:50 ` Artem Bityutskiy
2020-09-03 16:13 ` Artem Bityutskiy
2020-09-14 6:31 ` Pratik Sampat
2020-09-14 17:46 ` Gautham R Shenoy
2020-09-14 17:13 ` [RFC v4 0/1] Selftest " Gautham R Shenoy
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=fa616fed-66be-bcad-83b8-b1173a3a444f@linux.ibm.com \
--to=psampat@linux.ibm.com \
--cc=daniel.lezcano@linaro.org \
--cc=dedekind1@gmail.com \
--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=npiggin@gmail.com \
--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).