Re: [PATCH v2] ARM: avoid Cortex-A9 livelock on tight dmb loops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 25 Jan 2019, Tony Lindgren wrote:

> * Russell King <rmk+kernel@xxxxxxxxxxxxxxx> [190125 21:04]:
> > Executing loops such as:
> > 
> > 	while (1)
> > 		cpu_relax();
> > 
> > with interrupts disabled results in a livelock of the entire system,
> > as other CPUs are prevented making progress.  This is most noticable
> > as a failure of crashdump kexec, which stops just after issuing:
> > 
> > 	Loading crashdump kernel...
> > 
> > to the system console.  A workaround for this is to use 10 nops in
> > cpu_relax().
> > 
> > We also use wfe() in while (1) loops to avoid burning cycles in a
> > tight loop, giving the CPU a hint that we're not doing anything
> > useful.
> > 
> > Signed-off-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxx>
> > ---
> > It's been a while since this was posted, Will's suggestion was to use
> > 10 nops in cpu_relax() last time around.  I still prefer wfe() in
> > these infinite-not-doing-anything-ever loops.
> 
> Works for me:
> 
> Tested-by: Tony Lindgren <tony@xxxxxxxxxxx>

There was some concern in the past that WFE, like WFI, might cause the 
core to assert an external signal that might cause the SoC integration to 
place the core into a low-power mode from which it might not be able to 
wake up.  This could happen on OMAP, for example, with WFI.

I don't recall the outcome of those discussions.  Was a conclusion ever 
reached?


- Paul



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux