Skip to content

RFC Rework cpuidle vs instrumentation

Peter Zijlstra linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest9 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9x86/perf/amd: Remove tracing from perf_lopwr_cb()arch/x86/events/amd/brs.c+5 -80 replies
2/9x86/idle: Replace x86_idle with a static_callarch/x86/kernel/process.c+28 -221 reply
3/9cpuidle: Move IRQ state validationdrivers/cpuidle/cpuidle.c+5 -52 replies
4/9idle: Fix rcu_idle_*() usagearch/arm/mach-imx/cpuidle-imx6q.c drivers/acpi/processor_idle.c drivers/cpuidle/cpuidle.c +3 more+63 -473 replies
5/9rcu: Fix rcu_idle_exit()kernel/rcu/tree.c+3 -61 reply
6/9acpi_idle: Remove tracingdrivers/acpi/processor_idle.c+13 -110 replies
7/9cpuidle: Annotate poll_idle()drivers/cpuidle/poll_state.c+5 -10 replies
8/9objtool/idle: Validate __cpuidle code as noinstrarch/x86/include/asm/irqflags.h arch/x86/include/asm/mwait.h include/linux/compiler_types.h +2 more+25 -140 replies
9/9arch/idle: Change arch_cpu_idle() IRQ behaviourarch/alpha/kernel/process.c arch/arc/kernel/process.c arch/arm/kernel/process.c +24 more+29 -367 replies

Reviews trailers per patch

2 of 9 patches have a Reviewed-by or Acked-by.

PatchPaul E. McKenneyFrederic Weisbecker
1/9
2/9R-b
3/9
4/9
5/9A-b
6/9
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC][PATCH 0/9] Rework cpuidle vs instrumentation

Hi,

Most of these patches (with some obvious exceptions) stem from the period when we did the entry rewrite. I might even have posted some of them, but they landed on the floor and went unloved for a while.

Luckily, Frederic added a comment in his context tracking rework that made me remember these.

They build and boot x86_64. Be sure to build with DEBUG_ENTRY enabled to find noinstr violations -- I fixed all I found, but I didn't do allyesconfig builds.

Please have a look.

git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/idle

---
 arch/alpha/kernel/process.c       |  1 -
 arch/arc/kernel/process.c         |  3 ++
 arch/arm/kernel/process.c         |  1 -
 arch/arm/mach-gemini/board-dt.c   |  3 +-
 arch/arm/mach-imx/cpuidle-imx6q.c |  5 +--
 arch/arm64/kernel/idle.c          |  1 -
 arch/csky/kernel/process.c        |  1 -
 arch/csky/kernel/smp.c            |  2 +-
 arch/h8300/kernel/process.c       |  1 +
 arch/hexagon/kernel/process.c     |  1 -
 arch/ia64/kernel/process.c        |  1 +
 arch/microblaze/kernel/process.c  |  1 -
 arch/mips/kernel/idle.c           |  8 ++---
 arch/nios2/kernel/process.c       |  1 -
 arch/openrisc/kernel/process.c    |  1 +
 arch/parisc/kernel/process.c      |  2 --
 arch/powerpc/kernel/idle.c        |  5 ++-
 arch/riscv/kernel/process.c       |  1 -
 arch/s390/kernel/idle.c           |  1 -
 arch/sh/kernel/idle.c             |  1 +
 arch/sparc/kernel/leon_pmc.c      |  4 +++
 arch/sparc/kernel/process_32.c    |  1 -
 arch/sparc/kernel/process_64.c    |  3 +-
 arch/um/kernel/process.c          |  1 -
 arch/x86/coco/tdx/tdx.c           |  3 ++
 arch/x86/events/amd/brs.c         | 13 +++-----
 arch/x86/include/asm/irqflags.h   | 11 +++----
 arch/x86/include/asm/mwait.h      |  2 +-
 arch/x86/kernel/process.c         | 64 +++++++++++++++++++--------------------
 arch/xtensa/kernel/process.c      |  1 +
 drivers/acpi/processor_idle.c     | 42 ++++++++++++++-----------
 drivers/cpuidle/cpuidle.c         | 21 +++++++------
 drivers/cpuidle/poll_state.c      |  6 +++-
 include/linux/compiler_types.h    |  8 +++--
 include/linux/cpu.h               |  3 --
 include/linux/sched/idle.h        | 29 ++++++++++++++++++
 kernel/rcu/tree.c                 |  9 ++----
 kernel/sched/idle.c               | 47 ++++++++--------------------
 kernel/time/tick-broadcast.c      |  2 +-
 tools/objtool/check.c             | 15 ++++++++-
 40 files changed, 176 insertions(+), 150 deletions(-)