public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Aboorva Devarajan <aboorvad@linux.ibm.com>
To: rafael@kernel.org, daniel.lezcano@linaro.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: aboorvad@linux.ibm.com, christian.loehle@arm.com, gautam@linux.ibm.com
Subject: [PATCH 1/1] cpuidle/menu: avoid prioritizing physical state over polling state
Date: Fri,  9 Aug 2024 13:01:20 +0530	[thread overview]
Message-ID: <20240809073120.250974-2-aboorvad@linux.ibm.com> (raw)
In-Reply-To: <20240809073120.250974-1-aboorvad@linux.ibm.com>

Update the cpuidle menu governor to avoid prioritizing physical states
over polling states when predicted idle duration is lesser than the
physical states target residency duration for performance gains.

Signed-off-by: Aboorva Devarajan <aboorvad@linux.ibm.com>
---
 drivers/cpuidle/governors/menu.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index f3c9d49f0f2a..cf99ca103f9b 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -354,17 +354,6 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
 			idx = i; /* first enabled state */
 
 		if (s->target_residency_ns > predicted_ns) {
-			/*
-			 * Use a physical idle state, not busy polling, unless
-			 * a timer is going to trigger soon enough.
-			 */
-			if ((drv->states[idx].flags & CPUIDLE_FLAG_POLLING) &&
-			    s->exit_latency_ns <= latency_req &&
-			    s->target_residency_ns <= data->next_timer_ns) {
-				predicted_ns = s->target_residency_ns;
-				idx = i;
-				break;
-			}
 			if (predicted_ns < TICK_NSEC)
 				break;
 
-- 
2.39.3


  reply	other threads:[~2024-08-09  7:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-09  7:31 [PATCH 0/1] cpuidle/menu: Address performance drop from favoring physical over polling cpuidle state Aboorva Devarajan
2024-08-09  7:31 ` Aboorva Devarajan [this message]
2024-08-13 13:09   ` [PATCH 1/1] cpuidle/menu: avoid prioritizing physical state over polling state Christian Loehle
2024-09-19 16:08   ` Christian Loehle
2024-10-18 10:36   ` Gautam Menghani
2024-08-13 12:56 ` [PATCH 0/1] cpuidle/menu: Address performance drop from favoring physical over polling cpuidle state Christian Loehle
2024-08-20  8:51   ` Aboorva Devarajan
2024-08-21 10:55     ` Christian Loehle
2024-09-19  5:02       ` Aboorva Devarajan
2024-09-19  8:49         ` Christian Loehle
2024-09-19  9:43           ` Christian Loehle
2024-09-19 14:07             ` Christian Loehle
2024-09-19 14:38               ` Christian Loehle
2024-10-21  8:02                 ` Aboorva Devarajan
2024-10-21  9:03                   ` Christian Loehle
2024-10-21  7:40             ` Aboorva Devarajan
2024-10-21  5:27           ` Aboorva Devarajan
2024-10-21  8:43             ` Christian Loehle

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=20240809073120.250974-2-aboorvad@linux.ibm.com \
    --to=aboorvad@linux.ibm.com \
    --cc=christian.loehle@arm.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=gautam@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.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