-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Tracking: Thread scheduler scheduling #124
Comments
Additionally
Both are quite important and very likely break games. Especially SendSyncRequest. Thanks to these 2 yielding the running thread, it means that a program can completely ignore threads other than the main thread, and the kernel will still occasionally put the thread to sleep and give other threads time to shine. |
Also as a side note the address arbiter code only works if the game only ever creates a single arbiter (because it straight up ignores which arbiter a thread is sleeping on) In my defense I wrote the relevant code around the same day I started the emulator and had no idea what I was doing |
Some games like Sonic Boom seem to ask for threads to run on the syscore. These threads typically have low priority so they may never actually get to run in the emulator, while real hardware would run them in parallel to the appcore using the limited syscore time applications can take up. Old Citra fixed this by boosting the priority of starved threads, while newer Citra uses separate per core thread-managers. |
It is important to remember the thread scheduler only pretends to be cooperative and loves to preempt.
Particularly any sort of ARM11 timer interrupt can preempt the running process, which is important to emulate since a lot of games seem to get stuck due to multithreading issues (eg #88).
Unimplemented examples of this pre-emption can be seen in
We do have some cases implemented (eg events firing), but it's probably not good enough and still causes bugs/games hanging.
Below I attach some relevant resources from our Discord server.
The text was updated successfully, but these errors were encountered: