Re: [PATCH 23/36] arm64,smp: Remove trace_.*_rcuidle() usage

2022-06-14 Thread Marc Zyngier
On Tue, 14 Jun 2022 17:24:48 +0100, Mark Rutland wrote: > > On Wed, Jun 08, 2022 at 04:27:46PM +0200, Peter Zijlstra wrote: > > Ever since commit d3afc7f12987 ("arm64: Allow IPIs to be handled as > > normal interrupts") this function is called in regular IRQ context. > > > > Signed-off-by: Peter

Re: [PATCH 34.5/36] cpuidle,omap4: Push RCU-idle into omap4_enter_lowpower()

2022-06-14 Thread Tony Lindgren
Hi, Adding Aaro Koskinen and Peter Vasil for pm24xx for n800 and n810 related idle. * Peter Zijlstra [220614 22:07]: > On Mon, Jun 13, 2022 at 03:39:05PM +0300, Tony Lindgren wrote: > > OMAP4 uses full SoC suspend modes as idle states, as such it needs the > > whole power-domain and clock-domain

Re: [PATCH 34.5/36] cpuidle,omap4: Push RCU-idle into omap4_enter_lowpower()

2022-06-14 Thread Peter Zijlstra
On Mon, Jun 13, 2022 at 03:39:05PM +0300, Tony Lindgren wrote: > OMAP4 uses full SoC suspend modes as idle states, as such it needs the > whole power-domain and clock-domain code from the idle path. > > All that code is not suitable to run with RCU disabled, as such push > RCU-idle deeper still. >

Re: [PATCH 16/36] rcu: Fix rcu_idle_exit()

2022-06-14 Thread Paul E. McKenney
On Wed, Jun 08, 2022 at 04:27:39PM +0200, Peter Zijlstra wrote: > Current rcu_idle_exit() is terminally broken because it uses > local_irq_{save,restore}(), which are traced which uses RCU. > > However, now that all the callers are sure to have IRQs disabled, we > can remove these calls. > > Sign

Re: [PATCH 14/36] cpuidle: Fix rcu_idle_*() usage

2022-06-14 Thread Peter Zijlstra
On Tue, Jun 14, 2022 at 01:41:13PM +0100, Mark Rutland wrote: > On Wed, Jun 08, 2022 at 04:27:37PM +0200, Peter Zijlstra wrote: > > --- a/kernel/time/tick-broadcast.c > > +++ b/kernel/time/tick-broadcast.c > > @@ -622,9 +622,13 @@ struct cpumask *tick_get_broadcast_onesh > > * to avoid a deep idl

Re: [PATCH 00/36] cpuidle,rcu: Cleanup the mess

2022-06-14 Thread Peter Zijlstra
On Tue, Jun 14, 2022 at 12:19:29PM +0100, Mark Rutland wrote: > On Wed, Jun 08, 2022 at 04:27:23PM +0200, Peter Zijlstra wrote: > > Hi All! (omg so many) > > Hi Peter, > > Sorry for the delay; my plate has also been rather full recently. I'm > beginning > to page this in now. No worries; we all

Re: [PATCH 23/36] arm64,smp: Remove trace_.*_rcuidle() usage

2022-06-14 Thread Mark Rutland
On Wed, Jun 08, 2022 at 04:27:46PM +0200, Peter Zijlstra wrote: > Ever since commit d3afc7f12987 ("arm64: Allow IPIs to be handled as > normal interrupts") this function is called in regular IRQ context. > > Signed-off-by: Peter Zijlstra (Intel) [adding Marc since he authored that commit] Makes

Re: [PATCH 00/36] cpuidle,rcu: Cleanup the mess

2022-06-14 Thread Mark Rutland
On Tue, Jun 14, 2022 at 06:58:30PM +0200, Peter Zijlstra wrote: > On Tue, Jun 14, 2022 at 12:19:29PM +0100, Mark Rutland wrote: > > On Wed, Jun 08, 2022 at 04:27:23PM +0200, Peter Zijlstra wrote: > > > Hi All! (omg so many) > > > > Hi Peter, > > > > Sorry for the delay; my plate has also been rat

Re: [PATCH 24/36] printk: Remove trace_.*_rcuidle() usage

2022-06-14 Thread Steven Rostedt
On Thu, 9 Jun 2022 15:02:20 +0200 Petr Mladek wrote: > > I'm somewhat curious whether we can actually remove that trace event. > > Good question. > > Well, I think that it might be useful. It allows to see trace and > printk messages together. Yes people still use it. I was just asked about

Re: [PATCH 15/36] cpuidle,cpu_pm: Remove RCU fiddling from cpu_pm_{enter,exit}()

2022-06-14 Thread Mark Rutland
On Tue, Jun 14, 2022 at 06:42:14PM +0200, Peter Zijlstra wrote: > On Tue, Jun 14, 2022 at 05:13:16PM +0100, Mark Rutland wrote: > > On Wed, Jun 08, 2022 at 04:27:38PM +0200, Peter Zijlstra wrote: > > > All callers should still have RCU enabled. > > > > IIUC with that true we should be able to drop

Re: [PATCH 15/36] cpuidle,cpu_pm: Remove RCU fiddling from cpu_pm_{enter,exit}()

2022-06-14 Thread Mark Rutland
On Wed, Jun 08, 2022 at 04:27:38PM +0200, Peter Zijlstra wrote: > All callers should still have RCU enabled. IIUC with that true we should be able to drop the RCU_NONIDLE() from drivers/perf/arm_pmu.c, as we only needed that for an invocation via a pm notifier. I should be able to give that a spi

Re: [PATCH 14/36] cpuidle: Fix rcu_idle_*() usage

2022-06-14 Thread Mark Rutland
On Tue, Jun 14, 2022 at 06:40:53PM +0200, Peter Zijlstra wrote: > On Tue, Jun 14, 2022 at 01:41:13PM +0100, Mark Rutland wrote: > > On Wed, Jun 08, 2022 at 04:27:37PM +0200, Peter Zijlstra wrote: > > > --- a/kernel/time/tick-broadcast.c > > > +++ b/kernel/time/tick-broadcast.c > > > @@ -622,9 +622,

Re: [Pv-drivers] [PATCH 29/36] cpuidle, xenpv: Make more PARAVIRT_XXL noinstr clean

2022-06-14 Thread Peter Zijlstra
On Mon, Jun 13, 2022 at 07:23:13PM +, Nadav Amit wrote: > On Jun 13, 2022, at 11:48 AM, Srivatsa S. Bhat wrote: > > > ⚠ External Email > > > > On 6/8/22 4:27 PM, Peter Zijlstra wrote: > >> vmlinux.o: warning: objtool: acpi_idle_enter_s2idle+0xde: call to wbinvd() > >> leaves .noinstr.text s

Re: [PATCH 20/36] arch/idle: Change arch_cpu_idle() IRQ behaviour

2022-06-14 Thread Mark Rutland
On Wed, Jun 08, 2022 at 04:27:43PM +0200, Peter Zijlstra wrote: > Current arch_cpu_idle() is called with IRQs disabled, but will return > with IRQs enabled. > > However, the very first thing the generic code does after calling > arch_cpu_idle() is raw_local_irq_disable(). This means that > archite

Re: [PATCH 25/36] time/tick-broadcast: Remove RCU_NONIDLE usage

2022-06-14 Thread Mark Rutland
On Wed, Jun 08, 2022 at 04:27:48PM +0200, Peter Zijlstra wrote: > No callers left that have already disabled RCU. > > Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Mark. > --- > kernel/time/tick-broadcast-hrtimer.c | 29 - > 1 file changed, 12 ins

Re: [PATCH 16/36] rcu: Fix rcu_idle_exit()

2022-06-14 Thread Mark Rutland
On Wed, Jun 08, 2022 at 04:27:39PM +0200, Peter Zijlstra wrote: > Current rcu_idle_exit() is terminally broken because it uses > local_irq_{save,restore}(), which are traced which uses RCU. > > However, now that all the callers are sure to have IRQs disabled, we > can remove these calls. > > Sign

Re: [PATCH 15/36] cpuidle,cpu_pm: Remove RCU fiddling from cpu_pm_{enter,exit}()

2022-06-14 Thread Peter Zijlstra
On Tue, Jun 14, 2022 at 05:13:16PM +0100, Mark Rutland wrote: > On Wed, Jun 08, 2022 at 04:27:38PM +0200, Peter Zijlstra wrote: > > All callers should still have RCU enabled. > > IIUC with that true we should be able to drop the RCU_NONIDLE() from > drivers/perf/arm_pmu.c, as we only needed that f

Re: [PATCH 14/36] cpuidle: Fix rcu_idle_*() usage

2022-06-14 Thread Mark Rutland
On Wed, Jun 08, 2022 at 04:27:37PM +0200, Peter Zijlstra wrote: > --- a/kernel/time/tick-broadcast.c > +++ b/kernel/time/tick-broadcast.c > @@ -622,9 +622,13 @@ struct cpumask *tick_get_broadcast_onesh > * to avoid a deep idle transition as we are about to get the > * broadcast IPI right away.

Re: [PATCH 00/36] cpuidle,rcu: Cleanup the mess

2022-06-14 Thread Mark Rutland
On Wed, Jun 08, 2022 at 04:27:23PM +0200, Peter Zijlstra wrote: > Hi All! (omg so many) Hi Peter, Sorry for the delay; my plate has also been rather full recently. I'm beginning to page this in now. > These here few patches mostly clear out the utter mess that is cpuidle vs > rcuidle. > > At t

[PATCH 34.5/36] cpuidle,omap4: Push RCU-idle into omap4_enter_lowpower()

2022-06-14 Thread Tony Lindgren
OMAP4 uses full SoC suspend modes as idle states, as such it needs the whole power-domain and clock-domain code from the idle path. All that code is not suitable to run with RCU disabled, as such push RCU-idle deeper still. Signed-off-by: Tony Lindgren --- Peter here's one more for your series,

Re: [PATCH 29/36] cpuidle,xenpv: Make more PARAVIRT_XXL noinstr clean

2022-06-14 Thread Srivatsa S. Bhat
On 6/8/22 4:27 PM, Peter Zijlstra wrote: > vmlinux.o: warning: objtool: acpi_idle_enter_s2idle+0xde: call to wbinvd() > leaves .noinstr.text section > vmlinux.o: warning: objtool: default_idle+0x4: call to arch_safe_halt() > leaves .noinstr.text section > vmlinux.o: warning: objtool: xen_safe_hal

Re: [PATCH 34/36] cpuidle,omap3: Push RCU-idle into omap_sram_idle()

2022-06-14 Thread Tony Lindgren
* Peter Zijlstra [220608 15:00]: > On Wed, Jun 08, 2022 at 04:27:57PM +0200, Peter Zijlstra wrote: > > @@ -254,11 +255,18 @@ void omap_sram_idle(void) > > */ > > if (save_state) > > omap34xx_save_context(omap3_arm_context); > > + > > + if (rcuidle) > > + cpuidle_rc

Re: [PATCH 33/36] cpuidle,omap3: Use WFI for omap3_pm_idle()

2022-06-14 Thread Tony Lindgren
* Peter Zijlstra [220608 14:52]: > arch_cpu_idle() is a very simple idle interface and exposes only a > single idle state and is expected to not require RCU and not do any > tracing/instrumentation. > > As such, omap_sram_idle() is not a valid implementation. Replace it > with the simple (shallow

Re: [PATCH 12/36] cpuidle,omap2: Push RCU-idle into driver

2022-06-14 Thread Tony Lindgren
* Peter Zijlstra [220608 14:42]: > Doing RCU-idle outside the driver, only to then temporarily enable it > again, some *four* times, before going idle is daft. Maybe update the subject line with s/omap2/omap4/, other than that: Reviewed-by: Tony Lindgren Tested-by: Tony Lindgren _

Re: [PATCH 04/36] cpuidle,intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE

2022-06-14 Thread Peter Zijlstra
On Thu, Jun 09, 2022 at 04:49:21PM -0700, Jacob Pan wrote: > Hi Peter, > > On Wed, 08 Jun 2022 16:27:27 +0200, Peter Zijlstra > wrote: > > > Commit c227233ad64c ("intel_idle: enable interrupts before C1 on > > Xeons") wrecked intel_idle in two ways: > > > > - must not have tracing in idle func

Re: [PATCH 10/36] cpuidle,omap3: Push RCU-idle into driver

2022-06-14 Thread Tony Lindgren
* Peter Zijlstra [220608 14:42]: > Doing RCU-idle outside the driver, only to then teporarily enable it > again before going idle is daft. Reviewed-by: Tony Lindgren Tested-by: Tony Lindgren ___ linux-um mailing list linux-um@lists.infradead.org http

Re: [PATCH 21/36] x86/tdx: Remove TDX_HCALL_ISSUE_STI

2022-06-14 Thread Lai Jiangshan
On Wed, Jun 8, 2022 at 10:48 PM Peter Zijlstra wrote: > > Now that arch_cpu_idle() is expected to return with IRQs disabled, > avoid the useless STI/CLI dance. > > Per the specs this is supposed to work, but nobody has yet relied up > this behaviour so broken implementations are possible. I'm tot

Re: [PATCH 24/36] printk: Remove trace_.*_rcuidle() usage

2022-06-14 Thread Sergey Senozhatsky
On Thu, Jun 9, 2022 at 10:02 PM Petr Mladek wrote: > > On Thu 2022-06-09 20:30:58, Sergey Senozhatsky wrote: > > My emails are getting rejected... Let me try web-interface > > Bad day for mail sending. I have problems as well ;-) For me the problem is still there and apparently it's an "too many

Re: [PATCH 04/36] cpuidle,intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE

2022-06-14 Thread Jacob Pan
Hi Peter, On Wed, 08 Jun 2022 16:27:27 +0200, Peter Zijlstra wrote: > Commit c227233ad64c ("intel_idle: enable interrupts before C1 on > Xeons") wrecked intel_idle in two ways: > > - must not have tracing in idle functions > - must return with IRQs disabled > > Additionally, it added a branc

Re: [PATCH 21/36] x86/tdx: Remove TDX_HCALL_ISSUE_STI

2022-06-14 Thread Peter Zijlstra
On Mon, Jun 13, 2022 at 04:26:01PM +0800, Lai Jiangshan wrote: > On Wed, Jun 8, 2022 at 10:48 PM Peter Zijlstra wrote: > > > > Now that arch_cpu_idle() is expected to return with IRQs disabled, > > avoid the useless STI/CLI dance. > > > > Per the specs this is supposed to work, but nobody has yet

Re: [PATCH 24/36] printk: Remove trace_.*_rcuidle() usage

2022-06-14 Thread Sergey Senozhatsky
On Thu, Jun 9, 2022 at 10:06 PM Petr Mladek wrote: > > Makes sense. Feel free to use for this patch: > > Acked-by: Petr Mladek Reviewed-by: Sergey Senozhatsky ___ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/l

Re: [PATCH 24/36] printk: Remove trace_.*_rcuidle() usage

2022-06-14 Thread Sergey Senozhatsky
My emails are getting rejected... Let me try web-interface Kudos to Petr for the questions and thanks to PeterZ for the answers. On Thu, Jun 9, 2022 at 7:02 PM Peter Zijlstra wrote: > This is the tracepoint used to spool all of printk into ftrace, I > suspect there's users, but I haven't used it