Skip to content

sysinfo.cpp: Relax TSC calibration constraints#17909

Open
elad335 wants to merge 2 commits into
RPCS3:masterfrom
elad335:uuu
Open

sysinfo.cpp: Relax TSC calibration constraints#17909
elad335 wants to merge 2 commits into
RPCS3:masterfrom
elad335:uuu

Conversation

@elad335
Copy link
Copy Markdown
Contributor

@elad335 elad335 commented Dec 21, 2025

Maybe fixes #17575

@AniLeo AniLeo requested a review from kd-11 December 21, 2025 16:13
Comment thread rpcs3/util/sysinfo.cpp
return 0;
}

if (freq.QuadPart <= 50'000)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is possible for any known TSC. 50KHz cycle counter is way too coarse for a high precision timer.
For reference the archaic RTC already has 32k resolution.
Let's gather data for now though before we decide which values to use for tuning.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't about possible motherboards or CPUs or operating system settings, it's the constraint for the function itself.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get that, but why 50k then? Why isn't any non-zero value legal?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the other explanation, it makes sense to have a lower bound. Let's at least make it a named constexpr like min_supported_tsc_frequency instead of magic constants.

Comment thread rpcs3/util/sysinfo.cpp
@cuesta4
Copy link
Copy Markdown

cuesta4 commented Apr 10, 2026

Is this dead?

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.

[Regression] Huge stutters and performance regressions after build 0.0.33-17061 in Windows 11 (#16240)

4 participants