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: Utilize Operating System sleep in detected RCHCNT loop #15801

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Jul 16, 2024

Affects perhaps less than 100 games, if no "Channel pattern loop" message appears then no affect on games.
Makes RCHCNT busy loops waiting for channel to be accessible with no side effects in games, use operating system sleep and thread notifications to save CPU time.

@elad335 elad335 added CPU Optimization Optimizes existing code LLVM Related to LLVM instruction decoders labels Jul 16, 2024
@@ -3532,6 +3551,50 @@ class spu_llvm_recompiler : public spu_recompiler_base, public cpu_translator
}
}

if (m_inst_attrs[(m_pos - m_base) / 4] == inst_attr::rchcnt_loop)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (m_inst_attrs[(m_pos - m_base) / 4] == inst_attr::rchcnt_loop)
if (m_inst_attrs[(m_pos - m_base) / 4] == inst_attr::rchcnt_loop)

Copy link
Contributor

@digant73 digant73 Jul 16, 2024

Choose a reason for hiding this comment

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

is there only a specific keyword (e.g. "Channel pattern loop") traced in the log file that we can search for to understand if the game is affected by this improvement? or are there also other keywords? which ones eventually

@elad335 elad335 force-pushed the analyser branch 3 times, most recently from 8de4fd4 to 1a9d476 Compare July 19, 2024 09:09
@elad335 elad335 marked this pull request as ready for review July 19, 2024 09:45
@elad335 elad335 merged commit a253426 into RPCS3:master Jul 19, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CPU LLVM Related to LLVM instruction decoders Optimization Optimizes existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants