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

ppcopcodes: avoid TLB flushes for noop SR changes #104

Merged
merged 2 commits into from
Jul 28, 2024

Conversation

mihaip
Copy link
Contributor

@mihaip mihaip commented Jul 28, 2024

They happen surprisingly often, and flushing the TLB is expensive because we need to walk over all entries.

Takes booting 10.2 on a Beige G3 from binary start to "Welcome to Macintosh" from 58s to 38s on my machine.

Also includes a small performance optimization for scanning address ranges on TLB cache misses.

We do a linear scan in find_range (which is called on all TLB misses) to
find the entries. The largest and most frequently hit entry is the
system memory (which starts at 0). By ensuring that it's the first entry
in the list, we end up only doing one iteration through the loop.
They happen surprisingly often, and flushing the TLB is expensive
because we need to walk over all entries.

Takes booting 10.2 on a Beige G3 from binary start to "Welcome to Macintosh"
from 58s to 38s on my machine.
@dingusdev dingusdev merged commit 6f62f9d into dingusdev:master Jul 28, 2024
5 checks passed
@mihaip mihaip deleted the upstream-mmu-perf branch July 31, 2024 05:20
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