[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    D8065: Ensure libinput connection thread uses real time scheduling
From:       Martin_Flöser <noreply () phabricator ! kde ! org>
Date:       2017-09-30 8:10:46
Message-ID: differential-rev-PHID-DREV-2hd6wh4p7irwi5yajwbx-req () phabricator ! kde ! org
[Download RAW message or body]

graesslin created this revision.
graesslin added reviewers: KWin, Plasma.
Restricted Application added a project: KWin.
Restricted Application added subscribers: kwin, plasma-devel.

REVISION 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

REPOSITORY
  R108 KWin

BRANCH
  libinput-rr

REVISION DETAIL
  https://phabricator.kde.org/D8065

AFFECTED FILES
  input.cpp
  libinput/connection.cpp
  libinput/connection.h
  main_wayland.cpp

To: graesslin, #kwin, #plasma
Cc: plasma-devel, kwin, bwowk, ZrenBot, progwolff, lesliezhai, ali-mohamed, \
hardening, jensreuterberg, abetts, sebas, apol, mart


[Attachment #3 (unknown)]

<table><tr><td style="">graesslin created this revision.<br />graesslin added \
reviewers: KWin, Plasma.<br />Restricted Application added a project: KWin.<br \
/>Restricted Application added subscribers: kwin, plasma-devel. </td><a \
style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; \
color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; \
background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; \
border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D8065" \
rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION \
SUMMARY</strong><div><p>The SCHED_RESET_ON_FORK results in threads (not only \
processes) to have<br /> the scheduling policy reset to default. This means that the \
libinput<br /> thread is not real time, but this was actually intended.</p>

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

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

<p>Keeping the capability till the libinput thread is created and adjust<br />
the thread itself. This option was discarded as I don&#039;t want KWin to<br />
have any capabilities when the QApplication is started.</p></div></div><br \
/><div><strong>TEST PLAN</strong><div><p>ps -eL -o class,rtprio,cmd,comm  | grep \
kwin_wayland</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 \
KWin</div></div></div><br \
/><div><strong>BRANCH</strong><div><div>libinput-rr</div></div></div><br \
/><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D8065" \
rel="noreferrer">https://phabricator.kde.org/D8065</a></div></div><br \
/><div><strong>AFFECTED FILES</strong><div><div>input.cpp<br /> \
libinput/connection.cpp<br /> libinput/connection.h<br />
main_wayland.cpp</div></div></div><br /><div><strong>To: </strong>graesslin, KWin, \
Plasma<br /><strong>Cc: </strong>plasma-devel, kwin, bwowk, ZrenBot, progwolff, \
lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart<br \
/></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic