[PATCH] powerpc/tm: P9 disabled suspend mode workaround

Michael Ellerman mpe at ellerman.id.au
Fri Oct 6 15:19:00 AEDT 2017


Michael Neuling <mikey at neuling.org> writes:

> Each POWER9 core is made of two super slices. Each super slice can
> only have one thread at a time in TM suspend mode. The super slice
> restricts ever entering a state where both threads are in suspend by
> aborting transactions on tsuspend or exceptions into the kernel.
>
> Unfortunately for context switch we need trechkpt which forces suspend
> mode. If a thread is already in suspend and a second thread needs to
> be restored that was suspended, the trechkpt must be executed.
> Currently the trechkpt will hang in this case until the other thread
> exits suspend. This causes problems for Linux resulting in hang and
> RCU stall detectors going off.
>
> To workaround this, we disable suspend in the core. This is done via a
> firmware change which stops the hardware ever getting into suspend.
> The hardware will always rollback a transaction on any tsuspend or
> entry into the kernel.
...
> A future firmware change will allow suspend mode on POWER9 but that is
> going to require additional Linux changes to support. In the interim,
> this allows TM to continue to (partially) work while stopping
> userspace from crashing Linux.

But in the absence of the firmware change it doesn't achieve that,
userspace can still hang the machine.

I don't want to knowingly leave the machine in a state where users can
kill their box just by running TM enabled software.

I also don't want the machine to boot into some completely novel and
untested mode where suspend doesn't work, without the user opting into
that.

So as discussed offline, until we have the additional changes to enable
suspend mode, we should default to TM off on P9, unless the user
explicitly requests no-suspend mode.

cheers


More information about the Linuxppc-dev mailing list