public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v4 0/8] SRF: Fix offline CPU preventing pc6 entry
@ 2024-11-25 13:20 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
                   ` (7 more replies)
  0 siblings, 8 replies; 42+ messages in thread
From: Patryk Wlazlyn @ 2024-11-25 13:20 UTC (permalink / raw)
  To: x86
  Cc: linux-kernel, linux-pm, rafael.j.wysocki, len.brown,
	artem.bityutskiy, dave.hansen, patryk.wlazlyn, peterz, tglx,
	gautham.shenoy

Sending an interim RFC patch. Rebased on top of Rafael's patches and
applied modified patch/suggestion from Gautham.

Please tell me what you think. Is this approach in general is
acceptable?

When playing dead we have now the preference ordered:
 1. Idle driver.
      - acpi_idle can now do FFH and calls mwait_play_dead_with_hint,
        but we disable the handlers on AMD, because AMD doesn't want to
        use mwait for play_dead.
      - intel_idle have a handler for SRF. Intel platforms fallback to
        cpuid leaf 0x5 on other platforms.
 2. Old mwait_play_dead() based on cpuid leaf 0x5.
 3. hlt_play_dead().


Changes since v3:
 * Reworded commit messages authored by me as advised by Dave.
   Expanded the context about the mwait_play_dead code, hint computation
   and what is a problem we observe and the patch addresses.
 * Different play_dead methods are called now one after the other,
   because they only return on success.

Patryk Wlazlyn (5):
  x86/smp: Allow calling mwait_play_dead with arbitrary hint
  x86/smp native_play_dead: Prefer cpuidle_play_dead() over
    mwait_play_dead()
  intel_idle: Provide enter_dead() handler for SRF
  acpi_idle: Add FFH cstate handling
  acpi_idle: Disallow play_dead with FFH cstate on AMD platforms

Rafael J. Wysocki (3):
  cpuidle: Do not return from cpuidle_play_dead() on callback failures
  cpuidle: Change :enter_dead() driver callback return type to void
  ACPI: processor_idle: Use acpi_idle_play_dead() for all C-states

 arch/x86/include/asm/cpufeatures.h |  1 +
 arch/x86/include/asm/smp.h         |  3 +
 arch/x86/kernel/acpi/cstate.c      |  9 +++
 arch/x86/kernel/smpboot.c          | 91 ++++++++++++++++--------------
 drivers/acpi/processor_idle.c      | 23 ++++----
 drivers/cpuidle/cpuidle.c          | 10 +++-
 drivers/idle/intel_idle.c          | 15 +++++
 include/acpi/processor.h           |  5 ++
 include/linux/cpuidle.h            |  2 +-
 9 files changed, 103 insertions(+), 56 deletions(-)

-- 
2.47.0


^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2024-11-26 13:38 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox