[windows] Use condvar wait to reduce sched contention #2686

Closed
Lizzie wants to merge 1 commit from win-use-condvar-wait into master
Member

This uses native conditional_var.wait() instead of doing a micromanagement of sleep and stuff. Should change scheduling policies to reduce thread contention. Windows particularly doesn't like small quanta anyways. This may also fix Windows ARM.
Keywords: May, should

Signed-off-by: lizzie lizzie@eden-emu.dev

This uses native conditional_var.wait() instead of doing a micromanagement of sleep and stuff. *Should* change scheduling policies to reduce thread contention. Windows particularly doesn't like small quanta anyways. This may also fix Windows ARM. Keywords: May, should Signed-off-by: lizzie <lizzie@eden-emu.dev>
Lizzie added 1 commit 2025-10-06 11:12:16 +02:00
[windows] Use condvar wait to reduce sched contention
All checks were successful
eden-license / license-header (pull_request) Successful in 25s
ee4d944340
Signed-off-by: lizzie <lizzie@eden-emu.dev>
requested reviews from CamilleLaVey, Maufeat, crueter, MrPurple666, MaranBr 2025-10-06 11:12:16 +02:00
Owner

Need to test on Windows, but @Lizzie, looks like this is having an adverse effect on Steam Deck. It is causing frame dips in TOTK out of random playthroughs. Potentially a thread is going to sleep or waiting and never gets a signal. You might be able to direct John on what to look at to see if we can catch it.

Need to test on Windows, but @Lizzie, looks like this is having an adverse effect on Steam Deck. It is causing frame dips in TOTK out of random playthroughs. Potentially a thread is going to sleep or waiting and never gets a signal. You might be able to direct John on what to look at to see if we can catch it.
Author
Member

Reduced performance on Windows considerably on various games; STL implementation for condvar is not appropriate, perhaps busy wait?

Reduced performance on Windows considerably on various games; STL implementation for condvar is not appropriate, perhaps busy wait?
Lizzie closed this pull request 2025-10-07 04:04:30 +02:00
All checks were successful
eden-license / license-header (pull_request) Successful in 25s
Required
Details

Pull request closed

Sign in to join this conversation.
No description provided.