[PATCH 00/36] cpuidle,rcu: Cleanup the mess
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: peterz@xxxxxxxxxxxxx
- Subject: [PATCH 00/36] cpuidle,rcu: Cleanup the mess
- From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
- Date: Wed, 08 Jun 2022 16:27:23 +0200
- Cc: rth@xxxxxxxxxxxxxxx, ink@xxxxxxxxxxxxxxxxxxxx, mattst88@xxxxxxxxx, vgupta@xxxxxxxxxx, linux@xxxxxxxxxxxxxxx, ulli.kroll@xxxxxxxxxxxxxx, linus.walleij@xxxxxxxxxx, shawnguo@xxxxxxxxxx, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>, kernel@xxxxxxxxxxxxxx, festevam@xxxxxxxxx, linux-imx@xxxxxxx, tony@xxxxxxxxxxx, khilman@xxxxxxxxxx, catalin.marinas@xxxxxxx, will@xxxxxxxxxx, guoren@xxxxxxxxxx, bcain@xxxxxxxxxxx, chenhuacai@xxxxxxxxxx, kernel@xxxxxxxxxx, geert@xxxxxxxxxxxxxx, sammy@xxxxxxxxx, monstr@xxxxxxxxx, tsbogend@xxxxxxxxxxxxxxxx, dinguyen@xxxxxxxxxx, jonas@xxxxxxxxxxxx, stefan.kristiansson@xxxxxxxxxxxxx, shorne@xxxxxxxxx, James.Bottomley@xxxxxxxxxxxxxxxxxxxxx, deller@xxxxxx, mpe@xxxxxxxxxxxxxx, benh@xxxxxxxxxxxxxxxxxxx, paulus@xxxxxxxxx, paul.walmsley@xxxxxxxxxx, palmer@xxxxxxxxxxx, aou@xxxxxxxxxxxxxxxxx, hca@xxxxxxxxxxxxx, gor@xxxxxxxxxxxxx, agordeev@xxxxxxxxxxxxx, borntraeger@xxxxxxxxxxxxx, svens@xxxxxxxxxxxxx, ysato@xxxxxxxxxxxxx, dalias@xxxxxxxx, davem@xxxxxxxxxxxxx, richard@xxxxxx, anton.ivanov@xxxxxxxxxxxxxxxxxx, johannes@xxxxxxxxxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, bp@xxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, hpa@xxxxxxxxx, acme@xxxxxxxxxx, mark.rutland@xxxxxxx, alexander.shishkin@xxxxxxxxxxxxxxx, jolsa@xxxxxxxxxx, namhyung@xxxxxxxxxx, jgross@xxxxxxxx, srivatsa@xxxxxxxxxxxxx, amakhalov@xxxxxxxxxx, pv-drivers@xxxxxxxxxx, boris.ostrovsky@xxxxxxxxxx, chris@xxxxxxxxxx, jcmvbkbc@xxxxxxxxx, rafael@xxxxxxxxxx, lenb@xxxxxxxxxx, pavel@xxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, mturquette@xxxxxxxxxxxx, sboyd@xxxxxxxxxx, daniel.lezcano@xxxxxxxxxx, lpieralisi@xxxxxxxxxx, sudeep.holla@xxxxxxx, agross@xxxxxxxxxx, bjorn.andersson@xxxxxxxxxx, anup@xxxxxxxxxxxxxx, thierry.reding@xxxxxxxxx, jonathanh@xxxxxxxxxx, jacob.jun.pan@xxxxxxxxxxxxxxx, Arnd Bergmann <arnd@xxxxxxxx>, yury.norov@xxxxxxxxx, andriy.shevchenko@xxxxxxxxxxxxxxx, linux@xxxxxxxxxxxxxxxxxx, rostedt@xxxxxxxxxxx, pmladek@xxxxxxxx, senozhatsky@xxxxxxxxxxxx, john.ogness@xxxxxxxxxxxxx, paulmck@xxxxxxxxxx, frederic@xxxxxxxxxx, quic_neeraju@xxxxxxxxxxx, josh@xxxxxxxxxxxxxxxx, mathieu.desnoyers@xxxxxxxxxxxx, jiangshanlai@xxxxxxxxx, joel@xxxxxxxxxxxxxxxxx, juri.lelli@xxxxxxxxxx, vincent.guittot@xxxxxxxxxx, dietmar.eggemann@xxxxxxx, bsegall@xxxxxxxxxx, mgorman@xxxxxxx, bristot@xxxxxxxxxx, vschneid@xxxxxxxxxx, jpoimboe@xxxxxxxxxx, linux-alpha@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-snps-arc@xxxxxxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-omap@xxxxxxxxxxxxxxx, linux-csky@xxxxxxxxxxxxxxx, linux-hexagon@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-m68k@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, openrisc@xxxxxxxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, linux-um@xxxxxxxxxxxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, linux-clk@xxxxxxxxxxxxxxx, linux-arm-msm@xxxxxxxxxxxxxxx, linux-tegra@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, rcu@xxxxxxxxxxxxxxx
- User-agent: quilt/0.66
Hi All! (omg so many)
These here few patches mostly clear out the utter mess that is cpuidle vs rcuidle.
At the end of the ride there's only 2 real RCU_NONIDLE() users left
arch/arm64/kernel/suspend.c: RCU_NONIDLE(__cpu_suspend_exit());
drivers/perf/arm_pmu.c: RCU_NONIDLE(armpmu_start(event, PERF_EF_RELOAD));
kernel/cfi.c: RCU_NONIDLE({
(the CFI one is likely dead in the kCFI rewrite) and there's only a hand full
of trace_.*_rcuidle() left:
kernel/trace/trace_preemptirq.c: trace_irq_enable_rcuidle(CALLER_ADDR0, CALLER_ADDR1);
kernel/trace/trace_preemptirq.c: trace_irq_disable_rcuidle(CALLER_ADDR0, CALLER_ADDR1);
kernel/trace/trace_preemptirq.c: trace_irq_enable_rcuidle(CALLER_ADDR0, caller_addr);
kernel/trace/trace_preemptirq.c: trace_irq_disable_rcuidle(CALLER_ADDR0, caller_addr);
kernel/trace/trace_preemptirq.c: trace_preempt_enable_rcuidle(a0, a1);
kernel/trace/trace_preemptirq.c: trace_preempt_disable_rcuidle(a0, a1);
All of them are in 'deprecated' code that is unused for GENERIC_ENTRY.
I've touched a _lot_ of code that I can't test and likely broken some of it :/
In particular, the whole ARM cpuidle stuff was quite involved with OMAP being
the absolute 'winner'.
I'm hoping Mark can help me sort the remaining ARM64 bits as he moves that to
GENERIC_ENTRY. I've also got a note that says ARM64 can probably do a WFE based
idle state and employ TIF_POLLING_NRFLAG to avoid some IPIs.
---
arch/alpha/kernel/process.c | 1
arch/alpha/kernel/vmlinux.lds.S | 1
arch/arc/kernel/process.c | 3 +
arch/arc/kernel/vmlinux.lds.S | 1
arch/arm/include/asm/vmlinux.lds.h | 1
arch/arm/kernel/process.c | 1
arch/arm/kernel/smp.c | 6 +--
arch/arm/mach-gemini/board-dt.c | 3 +
arch/arm/mach-imx/cpuidle-imx6q.c | 4 +-
arch/arm/mach-imx/cpuidle-imx6sx.c | 5 ++
arch/arm/mach-omap2/cpuidle34xx.c | 16 ++++++++
arch/arm/mach-omap2/cpuidle44xx.c | 29 +++++++++------
arch/arm/mach-omap2/pm.h | 2 -
arch/arm/mach-omap2/pm34xx.c | 14 +++++--
arch/arm/mach-omap2/powerdomain.c | 10 ++---
arch/arm64/kernel/idle.c | 1
arch/arm64/kernel/smp.c | 4 +-
arch/arm64/kernel/vmlinux.lds.S | 1
arch/csky/kernel/process.c | 1
arch/csky/kernel/smp.c | 2 -
arch/csky/kernel/vmlinux.lds.S | 1
arch/hexagon/kernel/process.c | 1
arch/hexagon/kernel/vmlinux.lds.S | 1
arch/ia64/kernel/process.c | 1
arch/ia64/kernel/vmlinux.lds.S | 1
arch/loongarch/kernel/vmlinux.lds.S | 1
arch/m68k/kernel/vmlinux-nommu.lds | 1
arch/m68k/kernel/vmlinux-std.lds | 1
arch/m68k/kernel/vmlinux-sun3.lds | 1
arch/microblaze/kernel/process.c | 1
arch/microblaze/kernel/vmlinux.lds.S | 1
arch/mips/kernel/idle.c | 8 +---
arch/mips/kernel/vmlinux.lds.S | 1
arch/nios2/kernel/process.c | 1
arch/nios2/kernel/vmlinux.lds.S | 1
arch/openrisc/kernel/process.c | 1
arch/openrisc/kernel/vmlinux.lds.S | 1
arch/parisc/kernel/process.c | 2 -
arch/parisc/kernel/vmlinux.lds.S | 1
arch/powerpc/kernel/idle.c | 5 +-
arch/powerpc/kernel/vmlinux.lds.S | 1
arch/riscv/kernel/process.c | 1
arch/riscv/kernel/vmlinux-xip.lds.S | 1
arch/riscv/kernel/vmlinux.lds.S | 1
arch/s390/kernel/idle.c | 1
arch/s390/kernel/vmlinux.lds.S | 1
arch/sh/kernel/idle.c | 1
arch/sh/kernel/vmlinux.lds.S | 1
arch/sparc/kernel/leon_pmc.c | 4 ++
arch/sparc/kernel/process_32.c | 1
arch/sparc/kernel/process_64.c | 3 +
arch/sparc/kernel/vmlinux.lds.S | 1
arch/um/kernel/dyn.lds.S | 1
arch/um/kernel/process.c | 1
arch/um/kernel/uml.lds.S | 1
arch/x86/coco/tdx/tdcall.S | 15 +-------
arch/x86/coco/tdx/tdx.c | 25 +++----------
arch/x86/events/amd/brs.c | 13 ++-----
arch/x86/include/asm/irqflags.h | 11 ++---
arch/x86/include/asm/mwait.h | 14 +++----
arch/x86/include/asm/nospec-branch.h | 2 -
arch/x86/include/asm/paravirt.h | 6 ++-
arch/x86/include/asm/perf_event.h | 2 -
arch/x86/include/asm/shared/io.h | 4 +-
arch/x86/include/asm/shared/tdx.h | 1
arch/x86/include/asm/special_insns.h | 6 +--
arch/x86/include/asm/xen/hypercall.h | 2 -
arch/x86/kernel/paravirt.c | 14 ++++++-
arch/x86/kernel/process.c | 65 +++++++++++++++++------------------
arch/x86/kernel/vmlinux.lds.S | 1
arch/x86/xen/enlighten_pv.c | 2 -
arch/x86/xen/irq.c | 2 -
arch/xtensa/kernel/process.c | 1
arch/xtensa/kernel/vmlinux.lds.S | 1
drivers/acpi/processor_idle.c | 46 ++++++++++++++----------
drivers/base/power/runtime.c | 24 ++++++------
drivers/clk/clk.c | 8 ++--
drivers/cpuidle/cpuidle-arm.c | 1
drivers/cpuidle/cpuidle-big_little.c | 8 +++-
drivers/cpuidle/cpuidle-mvebu-v7.c | 7 +++
drivers/cpuidle/cpuidle-psci.c | 10 +++--
drivers/cpuidle/cpuidle-qcom-spm.c | 1
drivers/cpuidle/cpuidle-riscv-sbi.c | 10 +++--
drivers/cpuidle/cpuidle-tegra.c | 21 ++++++++---
drivers/cpuidle/cpuidle.c | 21 +++++------
drivers/cpuidle/dt_idle_states.c | 2 -
drivers/cpuidle/poll_state.c | 10 ++++-
drivers/idle/intel_idle.c | 29 ++++++++++++---
include/asm-generic/vmlinux.lds.h | 9 +---
include/linux/compiler_types.h | 8 +++-
include/linux/cpu.h | 3 -
include/linux/cpuidle.h | 33 +++++++++++++++++
include/linux/cpumask.h | 4 +-
include/linux/sched/idle.h | 40 ++++++++++++++++-----
include/linux/thread_info.h | 18 +++++++++
include/linux/tracepoint.h | 13 ++++++-
kernel/cpu_pm.c | 9 ----
kernel/printk/printk.c | 2 -
kernel/rcu/tree.c | 9 +---
kernel/sched/idle.c | 47 +++++++------------------
kernel/time/tick-broadcast-hrtimer.c | 29 ++++++---------
kernel/time/tick-broadcast.c | 6 ++-
kernel/trace/trace.c | 3 +
tools/objtool/check.c | 15 +++++++-
104 files changed, 449 insertions(+), 342 deletions(-)
- Follow-Ups:
- Re: [PATCH 00/36] cpuidle,rcu: Cleanup the mess
- [PATCH 16/36] rcu: Fix rcu_idle_exit()
- [PATCH 28/36] cpuidle,tdx: Make tdx noinstr clean
- [PATCH 19/36] objtool/idle: Validate __cpuidle code as noinstr
- [PATCH 11/36] cpuidle,armada: Push RCU-idle into driver
- [PATCH 33/36] cpuidle,omap3: Use WFI for omap3_pm_idle()
- [PATCH 14/36] cpuidle: Fix rcu_idle_*() usage
- [PATCH 36/36] cpuidle,clk: Remove trace_.*_rcuidle()
- [PATCH 32/36] ftrace: WARN on rcuidle
- [PATCH 21/36] x86/tdx: Remove TDX_HCALL_ISSUE_STI
- [PATCH 25/36] time/tick-broadcast: Remove RCU_NONIDLE usage
- [PATCH 31/36] cpuidle,acpi: Make noinstr clean
- [PATCH 30/36] cpuidle,nospec: Make noinstr clean
- [PATCH 09/36] cpuidle,imx6: Push RCU-idle into driver
- [PATCH 27/36] cpuidle,mwait: Make noinstr clean
- [PATCH 13/36] cpuidle,dt: Push RCU-idle into driver
- [PATCH 20/36] arch/idle: Change arch_cpu_idle() IRQ behaviour
- [PATCH 04/36] cpuidle,intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE
- [PATCH 34/36] cpuidle,omap3: Push RCU-idle into omap_sram_idle()
- [PATCH 03/36] cpuidle/poll: Ensure IRQ state is invariant
- [PATCH 18/36] cpuidle: Annotate poll_idle()
- [PATCH 06/36] cpuidle,riscv: Push RCU-idle into driver
- [PATCH 24/36] printk: Remove trace_.*_rcuidle() usage
- [PATCH 35/36] cpuidle,powerdomain: Remove trace_.*_rcuidle()
- [PATCH 05/36] cpuidle: Move IRQ state validation
- [PATCH 10/36] cpuidle,omap3: Push RCU-idle into driver
- [PATCH 12/36] cpuidle,omap2: Push RCU-idle into driver
- [PATCH 22/36] arm,smp: Remove trace_.*_rcuidle() usage
- [PATCH 02/36] x86/idle: Replace x86_idle with a static_call
- [PATCH 15/36] cpuidle,cpu_pm: Remove RCU fiddling from cpu_pm_{enter,exit}()
- [PATCH 01/36] x86/perf/amd: Remove tracing from perf_lopwr_cb()
- [PATCH 26/36] cpuidle,sched: Remove annotations from TIF_{POLLING_NRFLAG,NEED_RESCHED}
- [PATCH 07/36] cpuidle,tegra: Push RCU-idle into driver
- [PATCH 08/36] cpuidle,psci: Push RCU-idle into driver
- [PATCH 23/36] arm64,smp: Remove trace_.*_rcuidle() usage
- [PATCH 17/36] acpi_idle: Remove tracing
- [PATCH 29/36] cpuidle,xenpv: Make more PARAVIRT_XXL noinstr clean
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]