linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Frederic Weisbecker <frederic@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Cc: "Rafael J . Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	<linux-pm@vger.kernel.org>, Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH 0/6 v3] cpuidle: Handle TIF_NR_POLLING on behalf of polling idle states
Date: Fri, 17 Jan 2025 23:21:42 +0530	[thread overview]
Message-ID: <8278ff79-9acd-4f5a-8525-fb800fac4775@amd.com> (raw)
In-Reply-To: <20250102150201.21639-1-frederic@kernel.org>

Hello Frederic,

On 1/2/2025 8:31 PM, Frederic Weisbecker wrote:
> The TIF_NR_POLLING handling against TIF_NEED_RESCHED polling/monitoring
> idle states (mwait and also software polling) is a bit messy, with quite
> some wasted cycles spent on useless atomic operations. This tries to
> consolidate this state handling from the cpuidle core.

I tested this series on my 3rd Generation EPYC System with ipistorm and
I've not observed any regressions in IPI throughput to idle CPUs in
TIF_POLLING mode. Additionally tested few microbenchmarks and there were
no surprises there either. Feel free to add:

Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>

-- 
Thanks and Regards,
Prateek

> 
> Changes since v2:
> 
> _ Handle buggy mwait implementations (thanks Rafael)
> 
> Frederic Weisbecker (4):
>    cpuidle: Remove unnecessary current_clr_polling_and_test() from
>      haltpoll
>    x86/cpuidle: Move buggy mwait implementations away from
>      CPUIDLE_FLAG_MWAIT
>    cpuidle: Remove call_cpuidle_s2idle()
>    cpuidle: Handle TIF_NR_POLLING on behalf of software polling idle
>      states
> 
> Peter Zijlstra (2):
>    cpuidle: Introduce CPUIDLE_FLAG_MWAIT
>    cpuidle: Handle TIF_NR_POLLING on behalf of CPUIDLE_FLAG_MWAIT states
> 
>   arch/arm/include/asm/cpuidle.h     |  2 ++
>   arch/arm64/include/asm/cpuidle.h   |  3 ++
>   arch/powerpc/include/asm/cpuidle.h |  4 +++
>   arch/riscv/include/asm/cpuidle.h   |  2 ++
>   arch/x86/include/asm/cpuidle.h     | 12 +++++++
>   arch/x86/include/asm/mwait.h       | 27 +++++++--------
>   drivers/acpi/processor_idle.c      |  5 +++
>   drivers/cpuidle/cpuidle-haltpoll.c |  3 --
>   drivers/cpuidle/cpuidle-powernv.c  | 10 ------
>   drivers/cpuidle/cpuidle-pseries.c  | 11 -------
>   drivers/cpuidle/cpuidle.c          | 22 ++++++++++++-
>   drivers/cpuidle/poll_state.c       | 30 +++++++----------
>   drivers/idle/intel_idle.c          |  8 +++++
>   include/asm-generic/Kbuild         |  1 +
>   include/asm-generic/cpuidle.h      | 10 ++++++
>   include/linux/cpuidle.h            |  1 +
>   include/linux/sched/idle.h         |  7 +++-
>   kernel/sched/idle.c                | 53 +++++++++---------------------
>   18 files changed, 114 insertions(+), 97 deletions(-)
>   create mode 100644 arch/x86/include/asm/cpuidle.h
>   create mode 100644 include/asm-generic/cpuidle.h
> 


      parent reply	other threads:[~2025-01-17 17:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-02 15:01 [PATCH 0/6 v3] cpuidle: Handle TIF_NR_POLLING on behalf of polling idle states Frederic Weisbecker
2025-01-02 15:01 ` [PATCH 1/6] cpuidle: Remove unnecessary current_clr_polling_and_test() from haltpoll Frederic Weisbecker
2025-01-02 15:01 ` [PATCH 2/6] cpuidle: Introduce CPUIDLE_FLAG_MWAIT Frederic Weisbecker
2025-01-14 14:01   ` Rafael J. Wysocki
2025-01-14 14:34     ` Sudeep Holla
2025-01-14 14:37       ` Rafael J. Wysocki
2025-01-02 15:01 ` [PATCH 3/6] x86/cpuidle: Move buggy mwait implementations away from CPUIDLE_FLAG_MWAIT Frederic Weisbecker
2025-01-14 14:35   ` Rafael J. Wysocki
2025-01-02 15:01 ` [PATCH 4/6] cpuidle: Handle TIF_NR_POLLING on behalf of CPUIDLE_FLAG_MWAIT states Frederic Weisbecker
2025-01-14 14:50   ` Rafael J. Wysocki
2025-01-17 18:09   ` K Prateek Nayak
2025-01-02 15:01 ` [PATCH 5/6] cpuidle: Remove call_cpuidle_s2idle() Frederic Weisbecker
2025-01-14 14:53   ` Rafael J. Wysocki
2025-01-02 15:02 ` [PATCH 6/6] cpuidle: Handle TIF_NR_POLLING on behalf of software polling idle states Frederic Weisbecker
2025-01-14 14:56   ` Rafael J. Wysocki
2025-01-17 17:51 ` K Prateek Nayak [this message]

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=8278ff79-9acd-4f5a-8525-fb800fac4775@amd.com \
    --to=kprateek.nayak@amd.com \
    --cc=bp@alien8.de \
    --cc=daniel.lezcano@linaro.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=frederic@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=tglx@linutronix.de \
    /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).