linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Linux PM <linux-pm@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Doug Smythies <dsmythies@telus.net>
Subject: [PATCH 1/4] cpuidle: teo: Ignore disabled idle states that are too deep
Date: Thu, 10 Oct 2019 23:32:17 +0200	[thread overview]
Message-ID: <6803360.ubpITS43T2@kreacher> (raw)
In-Reply-To: <60416800.X4hXmAfbqi@kreacher>

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Prevent disabled CPU idle state with target residencies beyond the
anticipated idle duration from being taken into account by the TEO
governor.

Fixes: b26bf6ab716f ("cpuidle: New timer events oriented governor for tickless systems")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/cpuidle/governors/teo.c |    7 +++++++
 1 file changed, 7 insertions(+)

Index: linux-pm/drivers/cpuidle/governors/teo.c
===================================================================
--- linux-pm.orig/drivers/cpuidle/governors/teo.c
+++ linux-pm/drivers/cpuidle/governors/teo.c
@@ -258,6 +258,13 @@ static int teo_select(struct cpuidle_dri
 
 		if (s->disabled || su->disable) {
 			/*
+			 * Ignore disabled states with target residencies beyond
+			 * the anticipated idle duration.
+			 */
+			if (s->target_residency > duration_us)
+				continue;
+
+			/*
 			 * If the "early hits" metric of a disabled state is
 			 * greater than the current maximum, it should be taken
 			 * into account, because it would be a mistake to select




  reply	other threads:[~2019-10-10 21:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 21:30 [PATCH 0/4] cpuidle: teo: Fix issues related to disabled idle states Rafael J. Wysocki
2019-10-10 21:32 ` Rafael J. Wysocki [this message]
2019-11-05 19:50   ` [PATCH 1/4] cpuidle: teo: Ignore disabled idle states that are too deep Doug Smythies
2019-10-10 21:32 ` [PATCH 2/4] cpuidle: teo: Rename local variable in teo_select() Rafael J. Wysocki
2019-11-05 19:50   ` Doug Smythies
2019-10-10 21:36 ` [PATCH 3/4] cpuidle: teo: Consider hits and misses metrics of disabled states Rafael J. Wysocki
2019-11-05 19:50   ` Doug Smythies
2019-10-10 21:37 ` [PATCH 4/4] cpuidle: teo: Fix "early hits" handling for disabled idle states Rafael J. Wysocki
2019-11-05 19:50   ` Doug Smythies
2019-11-05 22:15     ` Rafael J. Wysocki
2019-10-18  7:21 ` [PATCH 0/4] cpuidle: teo: Fix issues related to " Doug Smythies

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=6803360.ubpITS43T2@kreacher \
    --to=rjw@rjwysocki.net \
    --cc=daniel.lezcano@linaro.org \
    --cc=dsmythies@telus.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=peterz@infradead.org \
    --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).