public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jon Kohler <jon@nutanix.com>
To: Jacob Pan <jacob.jun.pan@linux.intel.com>,
	Len Brown <lenb@kernel.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Artem Bityutskiy <artem.bityutskiy@linux.intel.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Jon Kohler <jon@nutanix.com>
Subject: [PATCH] intel_idle: add CPUIDLE_FLAG_IRQ_ENABLE to SPR C1 and C1E
Date: Thu, 30 Jun 2022 15:43:09 -0400	[thread overview]
Message-ID: <20220630194309.40465-1-jon@nutanix.com> (raw)

Add CPUIDLE_FLAG_IRQ_ENABLE to spr_cstates C1 and C1E, which will
allow local IRQs to be enabled during fast idle transitions on SPR.

Note: Enabling this for both C1 and C1E is slightly different than
the approach for SKX/ICX, where CPUIDLE_FLAG_IRQ_ENABLE is only
enabled on C1; however, given that SPR target/exit latency is 1/1
for c1 and 2/4 for C1E, respectively, which is slower than C1
for SKX, it seems prudent to now enable it on both states.

This is also important as on SPR it is possible for only C1 or
only C1E to be enabled (i.e. one of them would be disabled), so
only enabling C1 would short change C1E-only configurations.

Fixes: 9edf3c0ffef0 ("intel_idle: add SPR support")
Signed-off-by: Jon Kohler <jon@nutanix.com>
---
 drivers/idle/intel_idle.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 424ef470223d..f51857cddf2b 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -893,7 +893,7 @@ static struct cpuidle_state spr_cstates[] __initdata = {
 	{
 		.name = "C1",
 		.desc = "MWAIT 0x00",
-		.flags = MWAIT2flg(0x00),
+		.flags = MWAIT2flg(0x00) | CPUIDLE_FLAG_IRQ_ENABLE,
 		.exit_latency = 1,
 		.target_residency = 1,
 		.enter = &intel_idle,
@@ -902,7 +902,8 @@ static struct cpuidle_state spr_cstates[] __initdata = {
 		.name = "C1E",
 		.desc = "MWAIT 0x01",
 		.flags = MWAIT2flg(0x01) | CPUIDLE_FLAG_ALWAYS_ENABLE |
-					   CPUIDLE_FLAG_UNUSABLE,
+					   CPUIDLE_FLAG_UNUSABLE  |
+					   CPUIDLE_FLAG_IRQ_ENABLE,
 		.exit_latency = 2,
 		.target_residency = 4,
 		.enter = &intel_idle,
-- 
2.30.1 (Apple Git-130)


             reply	other threads:[~2022-06-30 19:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30 19:43 Jon Kohler [this message]
2022-07-01 13:30 ` [PATCH] intel_idle: add CPUIDLE_FLAG_IRQ_ENABLE to SPR C1 and C1E Artem Bityutskiy
2022-07-01 14:06   ` Jon Kohler
2023-11-10 20:00     ` Jon Kohler
2023-11-12 11:52       ` Artem Bityutskiy
2023-11-13 15:20         ` Jon Kohler

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=20220630194309.40465-1-jon@nutanix.com \
    --to=jon@nutanix.com \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=jacob.jun.pan@linux.intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@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