Thread (4 messages) flat view 4 messages, 3 authors, 2017-10-06

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

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-10-06 04:19:00

Michael Neuling [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help