linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Doug Smythies <dsmythies@telus.net>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Anna-Maria Behnsen <anna-maria@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Frederic Weisbecker <frederic@kernel.org>,
	Kajetan Puchalski <kajetan.puchalski@arm.com>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: Re: [RFT] [PATCH v1] cpuidle: menu: Skip tick_nohz_get_sleep_length() call in some cases
Date: Thu, 10 Aug 2023 19:20:32 +0200	[thread overview]
Message-ID: <CAJZ5v0iYCwAaMgpD=_M+Ynwx50UpQDV5GU4Lj1tkTKKAEt5xoA@mail.gmail.com> (raw)
In-Reply-To: <CAAYoRsVHFLpQ91DqUZygZETsYC31rhmgFru=19C-veXSH+dy5w@mail.gmail.com>

Hi Doug,

On Thu, Aug 10, 2023 at 6:28 PM Doug Smythies <dsmythies@telus.net> wrote:
>
> On Wed, Aug 9, 2023 at 11:16 AM Rafael J. Wysocki <rafael@kernel.org> wrote:
> > On Wed, Aug 9, 2023 at 4:53 PM Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> > >
> > > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > >
> > > Because the cost of calling tick_nohz_get_sleep_length() may increase
> > > in the future, reorder the code in menu_select() so it first uses the
> > > statistics to determine the expected idle duration.  If that value is
> > > higher than RESIDENCY_THRESHOLD_NS, tick_nohz_get_sleep_length() will
> > > be called to obtain the time till the closest timer and refine the
> > > idle duration prediction if necessary.
> > >
> > > This causes the governor to always take the full overhead of
> > > get_typical_interval() with the assumption that the cost will be
> > > amortized by skipping the tick_nohz_get_sleep_length() call in the
> > > cases when the predicted idle duration is relatively very small.
> > >
> > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > > ---
> ... deleted...
> >
> > This patch is now present in the git branch at
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
> >  pm-cpuidle-gov
> >
> > along with the previous teo governor changes.
>
> Hi Rafael,
>
> Thanks for the branch and adding it to the previous 6.5-rc4 code,
> as now I can re-use the menu baseline tests already done.
>
> My test computer boots by default to use the teo idle governor.
> When I change to the menu governor, my system becomes
> unresponsive and I have to re-boot.
>
> Is anyone else having this difficulty?

There is a missing check it get_typical_interval(), my bad.

I'll send a v2 of the menu governor patch shortly and I'll update the
pm-cpuidle-gov branch accordingly.

Thanks!

      reply	other threads:[~2023-08-10 17:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-09 14:53 [RFT] [PATCH v1] cpuidle: menu: Skip tick_nohz_get_sleep_length() call in some cases Rafael J. Wysocki
2023-08-09 18:16 ` Rafael J. Wysocki
2023-08-10 16:27   ` Doug Smythies
2023-08-10 17:20     ` Rafael J. Wysocki [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='CAJZ5v0iYCwAaMgpD=_M+Ynwx50UpQDV5GU4Lj1tkTKKAEt5xoA@mail.gmail.com' \
    --to=rafael@kernel.org \
    --cc=anna-maria@linutronix.de \
    --cc=dsmythies@telus.net \
    --cc=frederic@kernel.org \
    --cc=kajetan.puchalski@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=srinivas.pandruvada@linux.intel.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).