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

SPU/SYSINFO: Disable TSX by default for TSX-FA cpus #11105

Merged
merged 3 commits into from
Nov 4, 2021

Conversation

Whatcookie
Copy link
Member

Since stability and performance aren't ideal on cpus with TSX-FA, let's just disable it by default. It can be force enabled via the forced option, just like with haswell and TSX.

Additionally, support detecting the new RTM_ALWAYS_ABORT bit in cpuid. This is a new bit that only appears in new microcodes with disabled TSX. (see this commit for details torvalds/linux@1348924)

When TSX is disabled via this new microcode it can be re-enabled by writing 0x4 to the msr 0x0000010F. When enabled in this way, the performance of TSX seems to be the same as the pre TSX-FA microcodes. Intel has also removed the need for TSX to clobber the perfomance counters when TSX is in use (which perhaps indicates that intel removed their "workaround" for TSX bugs in this microcode?)

Intel says This bit is intended to be used on developer systems. If this bit is set, transactional atomicity correctness is not certain. So, expect bugs, and don't use it unless you're a "Developer".

- Also detect the new RTM_ALWAYS_ABORT bit in cpuid
- This new bit indicates that RTM is disabled in the microcode
- On cpus with RTM_ALWAYS_ABORT TSX can be renabled by writing 0x4 to the msr 0x0000010F
@Megamouse Megamouse added the CPU label Nov 3, 2021
@Linear524
Copy link

Hi Whatcookie !
I'm using TSX on my Xeon E5 2690v4 (Broadwell) and it brings me a decent speedup in every title I have without any issues. But I have a question - is there any plan to continue evolving and usage of TSX in RPCS3 in future releases ? or it will become useless due to crappy Intel politics about TSX ?
(P.S. - I like TSX feature, but I don't like how everybody tries to kill this awesome extension with latest software updates...)

@Whatcookie
Copy link
Member Author

I have no idea

@AniLeo AniLeo merged commit bf6044f into RPCS3:master Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants