public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org, rafael.j.wysocki@intel.com,
	len.brown@intel.com, artem.bityutskiy@linux.intel.com,
	dave.hansen@linux.intel.com, peterz@infradead.org,
	tglx@linutronix.de, gautham.shenoy@amd.com
Subject: Re: [RFC PATCH v4 5/8] x86/smp native_play_dead: Prefer cpuidle_play_dead() over mwait_play_dead()
Date: Tue, 26 Nov 2024 14:10:17 +0100	[thread overview]
Message-ID: <706408b6-fd2c-475a-bde6-c95d0cab7360@linux.intel.com> (raw)
In-Reply-To: <CAJZ5v0iA==dmnPbs6BNV_taDD9hRWbwOhiCWsi0BjKzVVdihdg@mail.gmail.com>

>>>>> If you first make intel_idle provide :enter_dead() for all CPUs on all
>>>>> platforms and implement it by calling mwait_play_dead_with_hint(), you
>>>>> won't need mwait_play_dead() any more.
>>>> Crossed my mind, but because mwait_play_dead doesn't filter on Intel
>>>> vendor specifically,
>>>
>>> In practice, it does.
>>>
>>> The vendor check in it is equivalent to "if Intel".
>>
>> Actually, what about INTEL_IDLE=n?
>> We might hit acpi_idle, which would call mwait_play_dead_with_hint() now, but
>> if we don't, don't we want to try mwait_play_dead before hlt or is it too
>> unrealistic to happen?
>
> In that case the hint to use would not be known anyway, so
> hlt_play_dead() is the right choice IMV.

Fair, it's not known, but we could fallback to the old, cpuid leaf 0x5 based
algorithm, which works on a lot of hardware.

That being said, I think it's cleaner to get rid of the old algorithm entirely
and rely on idle drivers to do the right thing from this point forward.

If we could bring the CPU out of the mwait loop into the hlt loop somehow (via
interrupt for example) we could remove the old kexec hack altogether.



  reply	other threads:[~2024-11-26 13:10 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-25 13:20 [RFC PATCH v4 0/8] SRF: Fix offline CPU preventing pc6 entry Patryk Wlazlyn
2024-11-25 13:20 ` [RFC PATCH v4 1/8] cpuidle: Do not return from cpuidle_play_dead() on callback failures Patryk Wlazlyn
2024-11-25 13:26   ` Rafael J. Wysocki
2024-11-25 14:36     ` Patryk Wlazlyn
2024-11-25 13:20 ` [RFC PATCH v4 2/8] cpuidle: Change :enter_dead() driver callback return type to void Patryk Wlazlyn
2024-11-25 13:20 ` [RFC PATCH v4 3/8] ACPI: processor_idle: Use acpi_idle_play_dead() for all C-states Patryk Wlazlyn
2024-11-25 13:24   ` Rafael J. Wysocki
2024-11-25 14:39     ` Patryk Wlazlyn
2024-11-25 14:36   ` Gautham R. Shenoy
2024-11-25 13:20 ` [RFC PATCH v4 4/8] x86/smp: Allow calling mwait_play_dead with arbitrary hint Patryk Wlazlyn
2024-11-25 14:39   ` Rafael J. Wysocki
2024-11-26 11:36     ` Patryk Wlazlyn
2024-11-26 11:45       ` Rafael J. Wysocki
2024-11-25 13:20 ` [RFC PATCH v4 5/8] x86/smp native_play_dead: Prefer cpuidle_play_dead() over mwait_play_dead() Patryk Wlazlyn
2024-11-25 13:45   ` Peter Zijlstra
2024-11-25 13:56   ` Rafael J. Wysocki
2024-11-25 14:43     ` Patryk Wlazlyn
2024-11-25 14:48       ` Rafael J. Wysocki
2024-11-26 11:56         ` Patryk Wlazlyn
2024-11-26 12:04           ` Rafael J. Wysocki
2024-11-26 13:10             ` Patryk Wlazlyn [this message]
2024-11-26 13:38               ` Rafael J. Wysocki
2024-11-25 13:20 ` [RFC PATCH v4 6/8] intel_idle: Provide enter_dead() handler for SRF Patryk Wlazlyn
2024-11-25 13:44   ` Rafael J. Wysocki
2024-11-25 14:48     ` Patryk Wlazlyn
2024-11-25 14:50       ` Rafael J. Wysocki
2024-11-25 13:53   ` Peter Zijlstra
2024-11-25 13:58     ` Rafael J. Wysocki
2024-11-25 14:12       ` Peter Zijlstra
2024-11-25 14:19         ` Rafael J. Wysocki
2024-11-25 13:20 ` [RFC PATCH v4 7/8] acpi_idle: Add FFH cstate handling Patryk Wlazlyn
2024-11-25 13:41   ` Rafael J. Wysocki
2024-11-25 14:00     ` Rafael J. Wysocki
2024-11-25 15:14   ` Gautham R. Shenoy
2024-11-26 12:03     ` Patryk Wlazlyn
2024-11-25 13:20 ` [RFC PATCH v4 8/8] acpi_idle: Disallow play_dead with FFH cstate on AMD platforms Patryk Wlazlyn
2024-11-25 13:46   ` Rafael J. Wysocki
2024-11-25 13:54   ` Peter Zijlstra
2024-11-25 14:56     ` Patryk Wlazlyn
2024-11-25 15:17       ` Gautham R. Shenoy
2024-11-25 15:15   ` Gautham R. Shenoy
2024-11-26 12:05     ` Patryk Wlazlyn

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=706408b6-fd2c-475a-bde6-c95d0cab7360@linux.intel.com \
    --to=patryk.wlazlyn@linux.intel.com \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=gautham.shenoy@amd.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rafael@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@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