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

VMManager: Refactor Affinity Control to Thread Pinning #11403

Merged
merged 1 commit into from
Jun 16, 2024
Merged

VMManager: Refactor Affinity Control to Thread Pinning #11403

merged 1 commit into from
Jun 16, 2024

Conversation

stenzek
Copy link
Contributor

@stenzek stenzek commented Jun 15, 2024

Description of Changes

Instead of having control over specific threads, thread pinning puts the EE/VU/GS threads on the most performant cores, then the software threads on the remaining cores, but only if they're in the same cluster.

This way we don't end up pinning across clusters with different performance characteristics, which would harm instead of help software renderer performance.

Also unpins on shutdown, that way we don't keep CPU cores awake.

And ignores SMT cores, because you don't want to be pinning two heavy threads on the same hyperthread...

Rationale behind Changes

The option in its current form is potentially detrimental to performance on heterogeneous CPUs.

Suggested Testing Steps

Check option behaves as expected. You can see what threads are pinned in the log.

Instead of having control over specific threads, thread pinning puts the
EE/VU/GS threads on the most performant cores, then the software threads
on the remaining cores, but only if they're in the same cluster.

This way we don't end up pinning across clusters with different
performance characteristics, which would harm instead of help software
renderer performance.

Also unpins on shutdown, that way we don't keep CPU cores awake.
@stenzek stenzek merged commit 8766d0b into PCSX2:master Jun 16, 2024
12 checks passed
@stenzek stenzek deleted the pinning branch June 16, 2024 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant