nine7nine / Wine-NSPA

Wine-NSPA: Proaudio & RT focused builds of Wine(-TKG)... WARNING: Forced Pushes && Resets..
20 stars 2 forks source link

Rewrite Wine-NSPA Scheduler Support #2

Closed nine7nine closed 1 year ago

nine7nine commented 1 year ago

This is partially complete, as of commit: https://github.com/nine7nine/Wine-NSPA/commit/1614c65ec41088a3846874b6c1900cd9414e4eea

The above commits replaces the sched_setscheduler() code with pthread functions, it also extends wineserver to support scheduling policy changes at runtime, and finally implement support for adjusting nice values (I'm sitting on code to adjust it at runtime).

the above will also require performance analysis within Wine. it would be interesting to see if this could help improve performance and/or reduce overhead, depending on how it's implemented.

NOTES:

By switching everything over to pthread-based RT support; it opens up a lot of opportunity in fine-tuning thread behaviour within Wineserver, Ntdll and user/application threads.

Likewise, as Linux-NSPA supports latency.nice I can fine-tune non-RT and RT thread latency tuning alike.

the hope is that I can do the same with ionice, cgroups, etc too => My manual scripts cover most of this now - and it makes a big difference, especially with things like Ableton Live 11. It's the difference between issues with xruns or almost zero xruns.

nine7nine commented 1 year ago

there are going to be a number of cleanups in server/thread.c RT/nice code, as well.

I do plan on ditching all of the sched_setscheduler() code everywhere and rebasing everything (clean patches) for Wine-NSAP-8.0.

nine7nine commented 1 year ago

Began the rebase/cleanup of my patches: https://github.com/nine7nine/Wine-NSPA/commit/a7d3b4ed7f6c9298a71fbb09d93b0ac9095e390c

This will make working on the rewrite much easier. ;-)

nine7nine commented 1 year ago

I've taken another step with this: https://github.com/nine7nine/Wine-NSPA/commit/95754dd1775adf31281757d34af9a1065d5d8ec4

the above commit fixes the Wineserver shmem threads - they now are set with their pthread attributes properly.

nine7nine commented 1 year ago

Worked out fixing the bleeding rtprios issue, here: https://github.com/nine7nine/Wine-NSPA/commit/95754dd1775adf31281757d34af9a1065d5d8ec4 and here: https://github.com/nine7nine/Wine-NSPA/commit/5d3f3c7a7d1f0aea169a877c1d001012fcd04cab

that also addresses wrongly set/bleeding niceness values

nine7nine commented 1 year ago

the main rewrites are done.

closing.