linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Weisbecker <frederic@kernel.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Frederic Weisbecker <frederic@kernel.org>,
	"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: [PATCH 0/5] cpuidle: Handle TIF_NR_POLLING on behalf of polling idle states v2
Date: Fri,  6 Dec 2024 14:04:03 +0100	[thread overview]
Message-ID: <20241206130408.18690-1-frederic@kernel.org> (raw)

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.

Changes since v1:

* Drop two x86 applied patches
* s/CPUIDLE_FLAG_POLLING_HARD/CPUIDLE_FLAG_MWAIT (Rafael)
* Fix confusion between polling and monitoring on comments (Rafael)
* Remove call_cpuidle_s2idle() (Rafael)

Frederic Weisbecker (3):
  cpuidle: Remove unnecessary current_clr_polling_and_test() from
    haltpoll
  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/x86/include/asm/mwait.h       |  3 +-
 drivers/acpi/processor_idle.c      |  3 ++
 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          |  5 ++-
 include/linux/cpuidle.h            |  1 +
 include/linux/sched/idle.h         |  7 +++-
 kernel/sched/idle.c                | 53 +++++++++---------------------
 11 files changed, 63 insertions(+), 85 deletions(-)

-- 
2.46.0


             reply	other threads:[~2024-12-06 13:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-06 13:04 Frederic Weisbecker [this message]
2024-12-06 13:04 ` [PATCH 1/5] cpuidle: Remove unnecessary current_clr_polling_and_test() from haltpoll Frederic Weisbecker
2024-12-06 13:04 ` [PATCH 2/5] cpuidle: Introduce CPUIDLE_FLAG_MWAIT Frederic Weisbecker
2024-12-10 14:03   ` Peter Zijlstra
2024-12-06 13:04 ` [PATCH 3/5] cpuidle: Handle TIF_NR_POLLING on behalf of CPUIDLE_FLAG_MWAIT states Frederic Weisbecker
2024-12-10 14:03   ` Peter Zijlstra
2024-12-18 13:24   ` Rafael J. Wysocki
2024-12-18 14:04     ` Frederic Weisbecker
2024-12-06 13:04 ` [PATCH 4/5] cpuidle: Remove call_cpuidle_s2idle() Frederic Weisbecker
2024-12-06 13:04 ` [PATCH 5/5] cpuidle: Handle TIF_NR_POLLING on behalf of software polling idle states Frederic Weisbecker

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=20241206130408.18690-1-frederic@kernel.org \
    --to=frederic@kernel.org \
    --cc=bp@alien8.de \
    --cc=daniel.lezcano@linaro.org \
    --cc=dave.hansen@linux.intel.com \
    --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).