pcsx2 icon indicating copy to clipboard operation
pcsx2 copied to clipboard

VMManager: MacOS CPU count detection

Open TellowKrinkle opened this issue 2 years ago • 5 comments

Description of Changes

Add CPU count detection for macOS Fixes #8585

Rationale behind Changes

So M1 users don't keep coming to us with performance issues because they have MTVU off

Note: cpuinfo prefers relying on cpuid over sysctl, which makes it misdetect M1s in Rosetta as 8 symmetric cores, so we're skipping cpuinfo on macOS.

Suggested Testing Steps

Reset to default settings and see if MTVU is enabled

TellowKrinkle avatar Apr 11 '23 01:04 TellowKrinkle

LGTM, tested M1, and intels with 2c/4t and 6c/12t

DigitalMajestic avatar Apr 11 '23 02:04 DigitalMajestic

Wondering if this would be better placed in the Darwin directory in common.

stenzek avatar Apr 11 '23 02:04 stenzek

Wondering if this would be better placed in the Darwin directory in common.

Like just put the macOS specific code there, or add a cpu detection header and move all the cpu detection (+ affinity setting?) there?

TellowKrinkle avatar May 10 '23 23:05 TellowKrinkle

Was just thinking abstract the routine to get the big/small core count (i.e. the sysctl stuff).

stenzek avatar May 11 '23 04:05 stenzek

@DigitalMajestic Could you test again and make sure it still works?

TellowKrinkle avatar May 13 '23 21:05 TellowKrinkle

LGTM

DigitalMajestic avatar May 15 '23 21:05 DigitalMajestic