FreeBSD Bugzilla – Attachment 243398 Details for
Bug 272511
x11-wm/plasma5-kwin: support mac_priority(4) on Wayland
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
v1 (apply via "git am")
bug272511.diff (text/plain), 2.39 KB, created by
Jan Beich
on 2023-07-15 08:04:41 UTC
(
hide
)
Description:
v1 (apply via "git am")
Filename:
MIME Type:
Creator:
Jan Beich
Created:
2023-07-15 08:04:41 UTC
Size:
2.39 KB
patch
obsolete
>From 71cefb0754ca71383692bc3190e79681393ebcd0 Mon Sep 17 00:00:00 2001 >From: Jan Beich <jbeich@FreeBSD.org> >Date: Sat, 15 Jul 2023 07:36:17 +0000 >Subject: [PATCH] x11-wm/plasma5-kwin: support mac_priority(4) on Wayland > >PR: 272511 >Approved by: ? >--- > x11-wm/plasma5-kwin/Makefile | 1 + > .../files/patch-src_utils_realtime.cpp | 35 +++++++++++++++++++ > x11-wm/plasma5-kwin/pkg-message | 8 +++++ > 3 files changed, 44 insertions(+) > create mode 100644 x11-wm/plasma5-kwin/files/patch-src_utils_realtime.cpp > create mode 100644 x11-wm/plasma5-kwin/pkg-message > >diff --git a/x11-wm/plasma5-kwin/Makefile b/x11-wm/plasma5-kwin/Makefile >index 6d3853a76212..60ff9205cba9 100644 >--- a/x11-wm/plasma5-kwin/Makefile >+++ b/x11-wm/plasma5-kwin/Makefile >@@ -1,5 +1,6 @@ > PORTNAME= kwin > DISTVERSION= ${KDE_PLASMA_VERSION} >+PORTREVISION= 1 > CATEGORIES= x11-wm kde kde-plasma > > MAINTAINER= kde@FreeBSD.org >diff --git a/x11-wm/plasma5-kwin/files/patch-src_utils_realtime.cpp b/x11-wm/plasma5-kwin/files/patch-src_utils_realtime.cpp >new file mode 100644 >index 000000000000..48efbb08a1c0 >--- /dev/null >+++ b/x11-wm/plasma5-kwin/files/patch-src_utils_realtime.cpp >@@ -0,0 +1,35 @@ >+- Emulate SCHED_RESET_ON_FORK via pthread_atfork >+- Switch to pthread_setschedparam as Linux sched_setscheduler >+ operates on threads contrary to POSIX >+ >+--- src/utils/realtime.cpp.orig 2023-06-20 13:32:36 UTC >++++ src/utils/realtime.cpp >+@@ -8,19 +8,24 @@ >+ >+ #include "config-kwin.h" >+ >+-#include <sched.h> >++#include <pthread.h> >+ >+ namespace KWin >+ { >+ >+ void gainRealTime() >+ { >+-#if HAVE_SCHED_RESET_ON_FORK >+ const int minPriority = sched_get_priority_min(SCHED_RR); >+ sched_param sp; >+ sp.sched_priority = minPriority; >+- sched_setscheduler(0, SCHED_RR | SCHED_RESET_ON_FORK, &sp); >+-#endif >++ if (pthread_setschedparam(pthread_self(), SCHED_RR, &sp)) >++ return; >++ >++ pthread_atfork(NULL, NULL, []() { >++ sched_param sp; >++ sp.sched_priority = 0; >++ pthread_setschedparam(pthread_self(), SCHED_OTHER, &sp); >++ }); >+ } >+ >+ } // namespace KWin >diff --git a/x11-wm/plasma5-kwin/pkg-message b/x11-wm/plasma5-kwin/pkg-message >new file mode 100644 >index 000000000000..df793f16184b >--- /dev/null >+++ b/x11-wm/plasma5-kwin/pkg-message >@@ -0,0 +1,8 @@ >+[ >+{ type: install >+ message: <<EOM >+Notes: >+- kwin_wayland can use mac_priority(4) to avoid stutter during high load >+EOM >+} >+]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 272511
: 243398