kwin/libinput
Martin Flöser 91d78daac4 Ensure libinput connection thread uses real time scheduling
Summary:
The SCHED_RESET_ON_FORK results in threads (not only processes) to have
the scheduling policy reset to default. This means that the libinput
thread is not real time, but this was actually intended.

To solve this problem KWin does start without the RESET_ON_FORK flag
during startup. Once createInput has been called the scheduling is
adjusted again and RESET_ON_FORK is added again. This results in the
libinput thread and all threads Qt starts in between (e.g. dbus) to gain
real time policy. But it is still not leaked to other processes or to
threads in KWin which don't need it.

Other options considered: just don't use RESET_ON_FORK and instead
manually reset on fork. This would mean all threads in KWin gain real
time, but we don't need this. It's only interesting for the main
(rendering, Wayland thread) and the input thread. Also the danger to
leak into another process is too high.

Keeping the capability till the libinput thread is created and adjust
the thread itself. This option was discarded as I don't want KWin to
have any capabilities when the QApplication is started.

Test Plan: ps -eL -o class,rtprio,cmd,comm  | grep kwin_wayland

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8065
2017-10-31 12:44:51 +01:00
..
connection.cpp Ensure libinput connection thread uses real time scheduling 2017-10-31 12:44:51 +01:00
connection.h Ensure libinput connection thread uses real time scheduling 2017-10-31 12:44:51 +01:00
context.cpp Require Qt 5.7 and remove pre-5.7 code 2017-02-07 20:43:19 +01:00
context.h
device.cpp [libinput] Fix enumeral and non-enumeral type in conditional expression warning 2017-07-29 19:30:59 +02:00
device.h [libinput] Change unset of scroll method and acceleration profile 2016-12-06 13:45:54 +01:00
events.cpp Fix TouchEvent::id() returning -1, fixes a crash 2017-09-19 07:11:40 +03:00
events.h Support for relative pointer motion events 2016-10-12 11:26:46 +02:00
libinput_logging.cpp pedantic fixes 2016-07-16 13:14:44 -04:00
libinput_logging.h