From: Kai Krakow Subject: Re: [PATCH v2 1/2] winebus.sys: Raise priority of device threads. Message-Id: Date: Tue, 11 Dec 2018 21:52:32 +0100 In-Reply-To: <87o99sdv8v.fsf@winehq.org> References: <20181210224555.24125-1-kai@kaishome.de> <87o99sdv8v.fsf@winehq.org> Am Di., 11. Dez. 2018 um 14:54 Uhr schrieb Alexandre Julliard : > > Kai Krakow writes: > > > This potentially reduces lag and makes the input device initialization > > faster under CPU load. > > Considering that SetThreadPriority() is basically a nop, I doubt that it > improves anything. I agree for the non-staging case. But if you start using staging with the realtime priority patchset, it helps. As a side-effect it also solved another problem I was seeing: Games may miss gamepad trigger releases which are implemented as axis events. With this patch, I'm yet to reproduce that issue - or in other words: It didn't show again. But due to the nature of the patch, this is actually not a fix, it only tightens timing enough to work for me. Also, other parts of wine source code already call this "basically" nop function, see "git grep SetThreadPriority". In my local development branch I'm currently working on replacing the staging realtime patches with a more exact implementation of priorities, also touching parts of MMCSS so native xaudio2 could take advantage of realtime priorities (it reduces audio crackling in my tests). So far, I was able to reduce priority inversion effects that can be seen with the staging realtime patches. But it is not ready for submission here, even not as a proposed staging patchset. I'm not very familiar with wine source code in general yet but I dug through a lot of documents and papers. So my other question is: Would this list be a proper place to discuss development and improvement of such patches? And would patches touching this functionality even be worth considering inclusion into wine? Thanks, Kai