All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Linux PM <linux-pm@vger.kernel.org>,
	Giovanni Gherdovich <ggherdovich@suse.cz>,
	Doug Smythies <dsmythies@telus.net>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Frederic Weisbecker <frederic@kernel.org>,
	Mel Gorman <mgorman@suse.de>, "Chen, Hu" <hu1.chen@intel.com>,
	Quentin Perret <quentin.perret@arm.com>
Subject: Re: [PATCH v11] cpuidle: New timer events oriented governor for tickless systems
Date: Wed, 16 Jan 2019 23:06:29 +0100	[thread overview]
Message-ID: <CAJZ5v0gLzX3c6o6wA9dXg7Wa00+CgaOG4aDQD=7x7UzuuzdegQ@mail.gmail.com> (raw)
In-Reply-To: <7ce53e4d-69ca-f7a5-5880-21999d926d3d@linaro.org>

On Wed, Jan 16, 2019 at 1:22 PM Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
>
> On 16/01/2019 13:03, Rafael J. Wysocki wrote:
> > On Friday, January 4, 2019 12:30:47 PM CET Rafael J. Wysocki wrote:
> >> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >>
> >> The venerable menu governor does some things that are quite
> >> questionable in my view.
> >>
> >> First, it includes timer wakeups in the pattern detection data and
> >> mixes them up with wakeups from other sources which in some cases
> >> causes it to expect what essentially would be a timer wakeup in a
> >> time frame in which no timer wakeups are possible (because it knows
> >> the time until the next timer event and that is later than the
> >> expected wakeup time).
> >>
> >> Second, it uses the extra exit latency limit based on the predicted
> >> idle duration and depending on the number of tasks waiting on I/O,
> >> even though those tasks may run on a different CPU when they are
> >> woken up.  Moreover, the time ranges used by it for the sleep length
> >> correction factors depend on whether or not there are tasks waiting
> >> on I/O, which again doesn't imply anything in particular, and they
> >> are not correlated to the list of available idle states in any way
> >> whatever.
> >>
> >> Also, the pattern detection code in menu may end up considering
> >> values that are too large to matter at all, in which cases running
> >> it is a waste of time.
> >>
> >> A major rework of the menu governor would be required to address
> >> these issues and the performance of at least some workloads (tuned
> >> specifically to the current behavior of the menu governor) is likely
> >> to suffer from that.  It is thus better to introduce an entirely new
> >> governor without them and let everybody use the governor that works
> >> better with their actual workloads.
> >>
> >> The new governor introduced here, the timer events oriented (TEO)
> >> governor, uses the same basic strategy as menu: it always tries to
> >> find the deepest idle state that can be used in the given conditions.
> >> However, it applies a different approach to that problem.
> >>
> >> First, it doesn't use "correction factors" for the time till the
> >> closest timer, but instead it tries to correlate the measured idle
> >> duration values with the available idle states and use that
> >> information to pick up the idle state that is most likely to "match"
> >> the upcoming CPU idle interval.
> >>
> >> Second, it doesn't take the number of "I/O waiters" into account at
> >> all and the pattern detection code in it avoids taking timer wakeups
> >> into account.  It also only uses idle duration values less than the
> >> current time till the closest timer (with the tick excluded) for that
> >> purpose.
> >
> > Given the lack of negative feedback and my confidence in this, I'm
> > queuing it up for 5.1.
>
> Yeah, this governor was not proposed in the better moment for review for
> me :/
>
> I agree writing a new governor is certainly simpler than revisiting the
> menu governor again. That is the advantage of the governors, we can add
> more of them suiting the needs.
>
> If you are confident and Doug bench-marked it showing better results
> than the menu governor on x86, I don't see any reason to not merge it.
>
> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Thank you!

      reply	other threads:[~2019-01-16 22:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04 11:30 [PATCH v11] cpuidle: New timer events oriented governor for tickless systems Rafael J. Wysocki
2019-01-16 12:03 ` Rafael J. Wysocki
2019-01-16 12:22   ` Daniel Lezcano
2019-01-16 22:06     ` 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='CAJZ5v0gLzX3c6o6wA9dXg7Wa00+CgaOG4aDQD=7x7UzuuzdegQ@mail.gmail.com' \
    --to=rafael@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=dsmythies@telus.net \
    --cc=frederic@kernel.org \
    --cc=ggherdovich@suse.cz \
    --cc=hu1.chen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=peterz@infradead.org \
    --cc=quentin.perret@arm.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.