Skip to content

Fix available CPU count and idle time when SMT is turned off#4

Draft
hach-que wants to merge 1 commit into
EpicGamesExt:mainfrom
RedpointGames:smt-disabled
Draft

Fix available CPU count and idle time when SMT is turned off#4
hach-que wants to merge 1 commit into
EpicGamesExt:mainfrom
RedpointGames:smt-disabled

Conversation

@hach-que
Copy link
Copy Markdown

This halves the idle time and CPU count when WINE_IS_SMT_DISABLED is set to 1, which should fix CPU calculations when the Unreal Build Accelerator is running on machines with SMT turned off.

@hach-que hach-que marked this pull request as draft March 24, 2025 13:35
@hach-que
Copy link
Copy Markdown
Author

There's still something wrong with this - the calculation in sync.c for decreasing the idle time to represent half the cores not being schedulable results in a CPU % in UBA that just sits at 100% and not the real variance in CPU. I'm not sure why this happens, given that idle_time should be at least 50% of the total time when SMT is turned off.

num_cpus = count_bits(all_cpus_mask);
+ if (is_smt_disabled)
+ {
+ num_cpus /= 2;
Copy link
Copy Markdown

@slonopotamus slonopotamus Jan 9, 2026

Choose a reason for hiding this comment

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

Is it correct? I am under the impression that the code assumes CPU actually has SMT, but what if it doesn't?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants