PS3 emulation is fast on ARM now
16 points by tjf
16 points by tjf
I'm only a minute in but uh, oh my god, they've got a busy wait inside of a loop that spins waiting on values to change in other threads?!
Yeah, it seems rather silly at first. If I recall correctly he said in another video that this was done this way rather than sleeping properly or yielding to the scheduler for performance consistency or something along those lines after users had issues and a bunch of benchmarking. I might also be very wrong tho.
Spinlocks are a lot more common than you'd think! They can be tricky to get right, especially in userspace (which is why Linux had to provide extra support for them), but RPCS3 is kind of an easy case: IIUC it just pins all threads to different cores (which would trivially avoid the typical footguns).