Rpcs3: Major TSX regressions on cpus with TSX_Force_Abort present

Created on 27 May 2019  路  18Comments  路  Source: RPCS3/rpcs3

Edit: Issues with TSX are valid to report here if TSX-FA appears in your log like so:
image

With an intel 7700K, and the latest microcode release (20190514) there are major performance and stability issues found when enabling TSX. Note that windows is usually several months slow on microcode updates, so windows users won't experience this yet without manual intervention.

With ninja gaiden sigma 2, the game hangs on the attract screen like so:
Screenshot from 2019-05-26 18-25-35
Normally, there is no loading screen between the scenes, but the threads responsible for loading hang and we never progress past this screen.
ninjagaidensigma2tsx.log.gz


debugger screenshots

fiosmediathreadhang
fiosmediathreadhang2

With persona 5 there is no hanging, but performance has regressed to the point where performance is now worse than with TSX off, and the log is spammed with "SPU: PUTLLC took too long:"
persona5tsx.log.gz


Persona 5 performance screenshots

tsxoncensored
tsxoffcensored

thats 30fps with TSX on and 39 fps with TSX off

reverting to the previous release of intel microcode gets 44 fps with tsx on, and ninja gaiden sigma 2 doesn't hang at all.

The logs and screenshots are all taken on master, but I tested against neko's pr as well and did not find any improvements in these games.

CPU

All 18 comments

Sharing some more findings here as well:
The latest microcode doesn't just include fixes for mds, but for TSX errata that impacted "Skylake (and later) CPUs" (basically every cpu with tsx that didn't already have it disabled)

Intel microcode releases don't include any kind of patch notes, but you can read a little about the mitigations via some posts by intel engineers for linux: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=004cc08675b761fd82288bab1b5ba5e1ca746eca

Performance in all games with tsx on now is worse than before the update, but many games still feature better performance than with tsx off. Persona 5 isn't as bad off as I thought it was, if you comment out the "putllc took too long" log message then performance improves to 37 fps, which is only a little bit worse than tsx off. (The message is spammed several thousand times per second with tsx on)

I'll keep this issue open for now, and others are welcome to post issues they find with the newest microcode as well.

Regressions I was able to find:
Shadow of the colossus HD:
TSX disabled - loads fine and goes ingame
TSX enabled - hangs on the intro.
TSOtChd_RPCS3.log.gz
Neverdead:
TSX disabled - goes ingame every time.
TSX Enabled - hangs on the intro. Sometimes crashes the entire emulator
RPCS3.zip

@DanteBC
Could you please verify for me that you're on the latest version of the microcode for your CPU? It's not included with windows updates yet so if you didn't manually intervene it won't be installed on your machine yet.

You have SKL-S cpu so you should be looking out for microcode version cc

If you check with hwinfo (https://www.hwinfo.com/download/) you should be able to find the microcode here.

checkmicrocode
(version 8E is included with windows for me which is an old release. version b4 is the version with regressions for KBL-S)

I have I7-7700 and according to hwinfo my microcode version is indeed 8E

ah, thought I read 6700 for some reason.

Anyways, your issues are still valid, but it'd be great if you could verify after which PR they regressed, and add your issues to here https://github.com/RPCS3/rpcs3/issues/6010 or open a new issue if its a more recent regression.

I already did. It happened after https://github.com/RPCS3/rpcs3/pull/6020
Should I make another issue or just copy my info there?

You should make a new issue.

@DanteBC Try to set Accurate PUTLLC to true in the config.yml, although I suspect it'll keep freezing on Kaby Lake.

This might be a bit extreme for most users but if you want you can disable Windows microcode updates by renaming mcupdate_GenuineIntel.dll inside the subfolder System32 of Windows to something like "mcupdate_GenuineIntel.dll.disabled".
Windows won't load the microcode at boot and you will be relying on the one included in your motherboard's bios.
Running sfc /scannow or any other Windows image verification/recovery function will download the file again.

@Whatcookie Try #6056 if you have time

Still an issue after #6056 ?

Some issues still remain with the newest microcode when running with TSX.

Performance has been much improved since the original post, it now generally performs somewhere inbetween TSX off and how TSX on performed on the old microcode, though where exactly it lands seems to depend on the game in question.

Ninja gaiden sigma 2 still suffers from loading screens that will never progress. It seems common to all games that use the "Fios Mediathread" library (has threads named Fios Mediathread in the debugger). It's easiest to reproduce with a game like NGS2 though since you can just idle on the attract screen and wait for it to hang without any input.

It takes much longer to hang than it used to, before it would almost always hang on the first or second screen, but it now seems to take a loop or two before it hangs. Earlier, when testing I tried setting sys_cond logging to trace which made it take much longer to hang. It's likely that it could be worked around by adding a sleep or busy_wait somewhere, but there's probably a less hacky solution out there.

The loading screen issues seem to have been fix with #6745.
Please retest.

Still seems to be an issue, though it takes a long time to reproduce (more than 10 minutes) now.

God of War 3 (BCUS98111) with "Write Color Buffers" enabled will freeze randomly on main menu (usually less than a minute) if TSX is enabled on a I9-9900k CPU.
Disabling TSX will fix the freezes when "Write Color Buffers" is enabled.

Hi are there a microcode update between early february / end of february ???
Because, at early february i could run tsx with any game, but since end of february, i got many glitch on many games when tsx on and it's not from rpcs3, i tried olders build

Just an update to tell that God of War 3 (BCUS98111) random freeze is still present with TSX on a i9-9900K CPU
RPCS3.log

i5 8600k TSX-FA

with tsx enabled i have graphical glitch doesn't appear when TSX disabled

Annotation 2020-05-02 063622

Annotation 2020-05-02 063822

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Xcedf picture Xcedf  路  3Comments

uaqlover picture uaqlover  路  3Comments

XeClutch picture XeClutch  路  3Comments

altiereslima picture altiereslima  路  3Comments

Nezarn picture Nezarn  路  3Comments