CEmu icon indicating copy to clipboard operation
CEmu copied to clipboard

CEmu SDL incorrectly uses multiple cores

Open TheLastMillennial opened this issue 3 years ago • 1 comments

What's wrong, and with what software version?

Operating System: Raspbian GNU/Linux 10 (buster) CEmu version: CEmu SDL v1.3 Describe your issue:
Apparently CEmu SDL is not supposed to use multiple cores at all. However, on my Raspberry Pi 3B (v1.2), when I run CEmu then check htop, cemu-sdl has five children and utilizes between 200% and 320% of my CPU (the load is spread out roughly evenly across all four cores). Strangely, the last child only uses RAM, it never uses any CPU resources.

Oddly, after I test the RAM through the [mode]>[alpha]>[s] self-test menu, CEmu suddenly switches to only using a single core which causes emulation speed to tank to ~30%. (a RAM reset through the memory management doesn't trigger this behavior). The calculator's APD also gets significantly shortened to a mere 25 seconds before the calculator turns off on its own.

When I run CEmu on my Raspberry Pi Zero W (which only has one core), CEmu only has one child and emulates at about 25% speed.

EDIT: When I run the RAM self test on the Raspberry Pi Zero W, the performance gets even worse. Emulation speed dips to ~7% and wont go any faster.

Any logs, error output, screenshot, other comments...?

htop on Raspberry Pi 3B before RAM reset htop on Raspberry Pi 3B after RAM reset

TheLastMillennial avatar Feb 07 '21 20:02 TheLastMillennial

The SDL version of CEmu itself doesn't use multiple threads, but SDL definitely does.

jacobly0 avatar Feb 08 '21 04:02 jacobly0