Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1690478 > unrolled thread
| Started by | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| First post | 2017-07-18 19:10 +0200 |
| Last post | 2017-07-19 10:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Regression with suspicious RCU usage splats with cpu_pm change "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-18 19:10 +0200
Re: Regression with suspicious RCU usage splats with cpu_pm change Tony Lindgren <tony@atomide.com> - 2017-07-19 10:10 +0200
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-07-18 19:10 +0200 |
| Subject | Re: Regression with suspicious RCU usage splats with cpu_pm change |
| Message-ID | <u4Eaw-5aT-49@gated-at.bofh.it> |
On Mon, Jul 17, 2017 at 10:41:38PM -0700, Tony Lindgren wrote:
> * Paul E. McKenney <paulmck@linux.vnet.ibm.com> [170717 05:40]:
> > On Sun, Jul 16, 2017 at 11:08:07PM -0700, Tony Lindgren wrote:
> > > * Alex Shi <alex.shi@linaro.org> [170716 16:25]:
> > > > I reused the rcu_irq_enter_irqson() from RCU_NONIDLE to avoid this issue.
> > > > It works fine.
> > > >
> > > > Tony, Could you like to give a tested-by if this patch works for you.
> > >
> > > Yeah that keeps things booting for me with no splats so:
> > >
> > > Tested-by: Tony Lindgren <tony@atomide.com>
> > >
> > > In general, it seems we're missing the knowledge in Linux kernel
> > > of when the entire system is idle. Right now it seems that only
> > > cpuidle_coupled knows that?
> > >
> > > We could probably simplify things by adding some PM state for
> > > entire system idle. Then cpuidle code and timer code could use
> > > that to test when it's safe to do whatever the SoC needs to do
> > > to enter deeper power states.
> > >
> > > If we already have something like that, please do let me know :)
> >
> > Well, we used to have CONFIG_NO_HZ_FULL_SYSIDLE, which detected
> > full-system idle lazily so as to avoid scalability bottlenecks.
> > https://lwn.net/Articles/558284/
> >
> > No one was using it, so I removed it last merge window. The
> > patch that removed it is at sysidle.2017.05.11a, which can
> > probably still be reverted cleanly. Or just use v4.11 or earlier.
>
> OK thanks for the pointer, for reference that commit is
> fe5ac724d81a ("rcu: Remove nohz_full full-system-idle state
> machine").
>
> For a potential user, I think we could use it for example in
> cpuidle_enter_state_coupled() + omap_enter_idle_coupled() where
> we try to figure out if the system is fully idle before calling
> tick_broadcast_enter().
Would you be willing to prototype your usage on v4.12? It still has
NO_HZ_FULL_SYSIDLE. You have to enable NO_HZ_FULL in order to enable
NO_HZ_FULL_SYSIDLE at the moment.
Either way, here is the important bit for usage:
bool rcu_sys_is_idle(void);
void rcu_sysidle_force_exit(void);
The rcu_sys_is_idle() function returns true if all CPUs other than the
time-keeping CPU (that is, tick_do_timer_cpu, which is usually CPU 0)
are in their idle loop. Of course, if you invoke rcu_sys_is_idle()
from any CPU other than the time-keeping CPU, you will automatically
get a return value of false.
RCU's idle-exit code already sets state appropriately, but if there
is some other circumstance where you need to force the state machine
out of all-CPUs-idle state, you can call rcu_sysidle_force_exit().
Thanx, Paul
[toc] | [next] | [standalone]
| From | Tony Lindgren <tony@atomide.com> |
|---|---|
| Date | 2017-07-19 10:10 +0200 |
| Message-ID | <u4Sds-5NQ-11@gated-at.bofh.it> |
| In reply to | #1690478 |
* Paul E. McKenney <paulmck@linux.vnet.ibm.com> [170718 10:00]:
> On Mon, Jul 17, 2017 at 10:41:38PM -0700, Tony Lindgren wrote:
> > * Paul E. McKenney <paulmck@linux.vnet.ibm.com> [170717 05:40]:
> > > On Sun, Jul 16, 2017 at 11:08:07PM -0700, Tony Lindgren wrote:
> > > > * Alex Shi <alex.shi@linaro.org> [170716 16:25]:
> > > > > I reused the rcu_irq_enter_irqson() from RCU_NONIDLE to avoid this issue.
> > > > > It works fine.
> > > > >
> > > > > Tony, Could you like to give a tested-by if this patch works for you.
> > > >
> > > > Yeah that keeps things booting for me with no splats so:
> > > >
> > > > Tested-by: Tony Lindgren <tony@atomide.com>
> > > >
> > > > In general, it seems we're missing the knowledge in Linux kernel
> > > > of when the entire system is idle. Right now it seems that only
> > > > cpuidle_coupled knows that?
> > > >
> > > > We could probably simplify things by adding some PM state for
> > > > entire system idle. Then cpuidle code and timer code could use
> > > > that to test when it's safe to do whatever the SoC needs to do
> > > > to enter deeper power states.
> > > >
> > > > If we already have something like that, please do let me know :)
> > >
> > > Well, we used to have CONFIG_NO_HZ_FULL_SYSIDLE, which detected
> > > full-system idle lazily so as to avoid scalability bottlenecks.
> > > https://lwn.net/Articles/558284/
> > >
> > > No one was using it, so I removed it last merge window. The
> > > patch that removed it is at sysidle.2017.05.11a, which can
> > > probably still be reverted cleanly. Or just use v4.11 or earlier.
> >
> > OK thanks for the pointer, for reference that commit is
> > fe5ac724d81a ("rcu: Remove nohz_full full-system-idle state
> > machine").
> >
> > For a potential user, I think we could use it for example in
> > cpuidle_enter_state_coupled() + omap_enter_idle_coupled() where
> > we try to figure out if the system is fully idle before calling
> > tick_broadcast_enter().
>
> Would you be willing to prototype your usage on v4.12? It still has
> NO_HZ_FULL_SYSIDLE. You have to enable NO_HZ_FULL in order to enable
> NO_HZ_FULL_SYSIDLE at the moment.
>
> Either way, here is the important bit for usage:
>
> bool rcu_sys_is_idle(void);
> void rcu_sysidle_force_exit(void);
>
> The rcu_sys_is_idle() function returns true if all CPUs other than the
> time-keeping CPU (that is, tick_do_timer_cpu, which is usually CPU 0)
> are in their idle loop. Of course, if you invoke rcu_sys_is_idle()
> from any CPU other than the time-keeping CPU, you will automatically
> get a return value of false.
>
> RCU's idle-exit code already sets state appropriately, but if there
> is some other circumstance where you need to force the state machine
> out of all-CPUs-idle state, you can call rcu_sysidle_force_exit().
OK sure I'll take a look at some point.
Thanks,
Tony
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web