[rfc] realtime priority patch based on rtkit

Maarten Lankhorst m.b.lankhorst at gmail.com
Sat Apr 17 15:14:48 CDT 2010

Hi James,

2010/4/17 James McKenzie <jjmckenzie51 at earthlink.net>:
> Maarten Lankhorst wrote:
>> Hi all,
>> I decided to dig through the sample documentation for rtkit and see if I
>> could find a way to make it work for wine.
>> There's still a few things missing: hardcoded libdbus soname, no checking
>> if dbus is available, -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include
>> should be added to ntdll/Makefile and SIGXCPU should demote all threads of
>> the application back to normal priority
>> The server queues an APC to the target thread that signals it should try
>> to acquire rt prio for it. the thread makes a request to rtkit over dbus to
>> say it wants realtime. This is because rtkit requires the affected process
>> to call dbus.
>> Any moral objections to this approach?
> Not a moral one, but does dbus reliably build for all of the other UNIXes,
> including the Mac?
Well it's useless on non-linux. Rtkit relies on 2 linux only things:
linux only extension. With this the process will receive a SIGXCPU if
it gets near its time limit, so it can degrade, if it doesn't sleep it
will get killed. Furthermore the rtkit daemon will monitor so if it
hits interactivity too much the rtkit daemon will reset all threads it
elevated to normal levels.

However this requires that the process that wants realtime asks over
dbus. AJ hates my awesome approach to this, so unless there's a better
way to do it, it will not get merged into wine.


More information about the wine-devel mailing list