linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Lukasz Luba <lukasz.luba@arm.com>
Cc: dietmar.eggemann@arm.com, viresh.kumar@linaro.org,
	rafael@kernel.org, daniel.lezcano@linaro.org, amitk@kernel.org,
	rui.zhang@intel.com, amit.kachhap@gmail.com,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v3 2/5] cpuidle: Add Cpufreq Active Stats calls tracking idle entry/exit
Date: Tue, 26 Apr 2022 19:29:57 +0300	[thread overview]
Message-ID: <47cbbe94b061d8d7b7c222a42fa80b7b4cd4b7e5.camel@gmail.com> (raw)
In-Reply-To: <36852629-f803-5ac9-bef5-bcfae3ed947d@arm.com>

On Tue, 2022-04-26 at 16:01 +0100, Lukasz Luba wrote:
> > I am worried about adding more stuff here.
> > 
> > Please, consider getting the stats after interrupts are re-enabled. You may
> > lose
> > some "precision" because of that, but it is probably overall better that
> > adding
> > to idle interrupt latency.
> 
> Definitely. I don't need such precision, so later when interrupts are
> re-enabled is OK for me.

Thanks. That is preferable in general: we do not do things with interrupts
disabled unless there is a very good reason to.

> 
> This new call might be empty for your x86 kernels, since probably
> you set the CONFIG_CPU_FREQ_STAT.I can add additional config
> so platforms might still have CONFIG_CPU_FREQ_STAT but avoid this
> new feature and additional overhead in idle exit when e.g.
> CONFIG_CPU_FREQ_ACTIVE_STAT is not set.
> 
> The x86 platforms won't use IPA governor, so it's reasonable to
> do this way.
> 
> Does this sounds good?

I did not thoroughly read your patches so can't comment on the details.

Just pointing that in general idle path is to be considered the critical path,
especially the part before interrupts are re-enabled. Not only on x86,
but on all platforms using cpuidle. This does not mean we can't read more
statistics there, but it does mean that we should be very careful about added
overhead, keep it under control, etc.

Thank you!


  reply	other threads:[~2022-04-26 16:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06 22:08 [RFC PATCH v3 0/5] Introduce Cpufreq Active Stats Lukasz Luba
2022-04-06 22:08 ` [RFC PATCH v3 1/5] cpufreq: stats: " Lukasz Luba
2022-04-06 22:08 ` [RFC PATCH v3 2/5] cpuidle: Add Cpufreq Active Stats calls tracking idle entry/exit Lukasz Luba
2022-04-26 12:05   ` Artem Bityutskiy
2022-04-26 15:01     ` Lukasz Luba
2022-04-26 16:29       ` Artem Bityutskiy [this message]
2022-04-27 13:58         ` Lukasz Luba
2022-04-06 22:08 ` [RFC PATCH v3 3/5] thermal: Add interface to cooling devices to handle governor change Lukasz Luba
2022-04-06 22:08 ` [RFC PATCH v3 4/5] thermal: power allocator: Prepare power actors and calm down when not used Lukasz Luba
2022-04-06 22:08 ` [RFC PATCH v3 5/5] thermal: cpufreq_cooling: Improve power estimation using Cpufreq Active Stats Lukasz Luba
2022-04-26  3:11 ` [RFC PATCH v3 0/5] Introduce " Viresh Kumar
2022-04-26  7:46   ` Lukasz Luba
2022-04-26  7:54     ` Viresh Kumar
2022-04-26  7:59       ` Lukasz Luba
2022-04-26  8:02         ` Viresh Kumar
2022-04-26 14:40           ` Lukasz Luba

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=47cbbe94b061d8d7b7c222a42fa80b7b4cd4b7e5.camel@gmail.com \
    --to=dedekind1@gmail.com \
    --cc=amit.kachhap@gmail.com \
    --cc=amitk@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=viresh.kumar@linaro.org \
    /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).