Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major TSX regressions on cpus with TSX_Force_Abort present #6028

Closed
Whatcookie opened this issue May 27, 2019 · 20 comments
Closed

Major TSX regressions on cpus with TSX_Force_Abort present #6028

Whatcookie opened this issue May 27, 2019 · 20 comments
Labels

Comments

@Whatcookie
Copy link
Member

Whatcookie commented May 27, 2019

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.

@Whatcookie
Copy link
Member Author

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.

@DanteBC
Copy link

DanteBC commented May 31, 2019

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

@Whatcookie
Copy link
Member Author

@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)

@DanteBC
Copy link

DanteBC commented May 31, 2019

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

@Whatcookie
Copy link
Member Author

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 #6010 or open a new issue if its a more recent regression.

@DanteBC
Copy link

DanteBC commented May 31, 2019

I already did. It happened after #6020
Should I make another issue or just copy my info there?

@Whatcookie
Copy link
Member Author

You should make a new issue.

@Nekotekina
Copy link
Member

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

@Whatcookie Whatcookie changed the title Major TSX regressions with latest intel microcode (7700K 20190514) Major TSX regressions on cpus with TSX_Force_Abort present Jun 1, 2019
@Artins90
Copy link

Artins90 commented Jun 4, 2019

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.

@Nekotekina
Copy link
Member

@Whatcookie Try #6056 if you have time

@AniLeo
Copy link
Member

AniLeo commented Jun 25, 2019

Still an issue after #6056 ?

@Whatcookie
Copy link
Member Author

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.

@Senninz8
Copy link

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

@Whatcookie
Copy link
Member Author

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

@Wagnard
Copy link

Wagnard commented Nov 8, 2019

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.

@Megamouse Megamouse added the CPU label Nov 16, 2019
@lainiwaku
Copy link

lainiwaku commented Mar 8, 2020

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

@Wagnard
Copy link

Wagnard commented Apr 30, 2020

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

@lainiwaku
Copy link

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

@Megamouse
Copy link
Contributor

Regarding the latest changes, is this still an issue?

@Whatcookie
Copy link
Member Author

Since it's now disabled by default, this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants