-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libwayland-server 1.18 100% CPU usage #15
Comments
|
Hm, maybe one of |
|
Found the issue: the new Wayland event loop does not In the Wayland case we could make it use the faster kqueue/EVFILT_TIMER backend anyway as they always set |
|
Is this a change you want in wayland or in libepoll-shim? |
Abi is backward compatible: https://abi-laboratory.pro/tracker/timeline/wayland/ Port changes: - Allow memfd_create on FreeBSD 13 for sealing - Drop ms_timeout workaround in favor of upstream fix[1] - Drop posix_fallocate patch as it was disabled in r455878 - Adjust posix_fallocate comment to improve clarity - Temporarily revert event loop update until epoll-shim#15 [2] is fixed [1]: https://gitlab.freedesktop.org/wayland/wayland/commit/75d14834570b [2]: jiixyj/epoll-shim#15 Build tested on: 11.3 aarch64 11.3 amd64 11.3 armv6 11.3 i386 12.0 amd64 12.0 i386 12.1 aarch64 12.1 amd64 12.1 armv6 12.1 armv7 12.1 i386 13.0 amd64 13.0 i386 Base GCC 4.2.1 (mimics powerpc*, mips*, riscv64) Run tested with: multimedia/libva-intel-driver multimedia/mpv www/firefox + MOZ_ENABLE_WAYLAND x11-servers/xwayland-devel x11-wm/cage x11-wm/sway x11/wl-clipboard PR: 244059 Submitted by: jbeich Tested by: manu Reviewed by: manu Approved by: x11 (bapt) Differential Revision: https://reviews.freebsd.org/D23643 git-svn-id: svn+ssh://svn.freebsd.org/ports/head@526103 35697150-7ecd-e111-bb59-0022644237b5
Abi is backward compatible: https://abi-laboratory.pro/tracker/timeline/wayland/ Port changes: - Allow memfd_create on FreeBSD 13 for sealing - Drop ms_timeout workaround in favor of upstream fix[1] - Drop posix_fallocate patch as it was disabled in r455878 - Adjust posix_fallocate comment to improve clarity - Temporarily revert event loop update until epoll-shim#15 [2] is fixed [1]: https://gitlab.freedesktop.org/wayland/wayland/commit/75d14834570b [2]: jiixyj/epoll-shim#15 Build tested on: 11.3 aarch64 11.3 amd64 11.3 armv6 11.3 i386 12.0 amd64 12.0 i386 12.1 aarch64 12.1 amd64 12.1 armv6 12.1 armv7 12.1 i386 13.0 amd64 13.0 i386 Base GCC 4.2.1 (mimics powerpc*, mips*, riscv64) Run tested with: multimedia/libva-intel-driver multimedia/mpv www/firefox + MOZ_ENABLE_WAYLAND x11-servers/xwayland-devel x11-wm/cage x11-wm/sway x11/wl-clipboard PR: 244059 Submitted by: jbeich Tested by: manu Reviewed by: manu Approved by: x11 (bapt) Differential Revision: https://reviews.freebsd.org/D23643
|
@zeising "The current implementation in epoll-shim doesn't do this correctly" should imply that a fix is required here in epoll-shim :) |
|
@myfreeweb Yeah, I just missed that on the first read-through. Sorry. :( |
Abi is backward compatible: https://abi-laboratory.pro/tracker/timeline/wayland/ Port changes: - Allow memfd_create on FreeBSD 13 for sealing - Drop ms_timeout workaround in favor of upstream fix[1] - Drop posix_fallocate patch as it was disabled in r455878 - Adjust posix_fallocate comment to improve clarity - Temporarily revert event loop update until epoll-shim#15 [2] is fixed [1]: https://gitlab.freedesktop.org/wayland/wayland/commit/75d14834570b [2]: jiixyj/epoll-shim#15 Build tested on: 11.3 aarch64 11.3 amd64 11.3 armv6 11.3 i386 12.0 amd64 12.0 i386 12.1 aarch64 12.1 amd64 12.1 armv6 12.1 armv7 12.1 i386 13.0 amd64 13.0 i386 Base GCC 4.2.1 (mimics powerpc*, mips*, riscv64) Run tested with: multimedia/libva-intel-driver multimedia/mpv www/firefox + MOZ_ENABLE_WAYLAND x11-servers/xwayland-devel x11-wm/cage x11-wm/sway x11/wl-clipboard PR: 244059 Submitted by: jbeich Tested by: manu Reviewed by: manu Approved by: x11 (bapt) Differential Revision: https://reviews.freebsd.org/D23643 git-svn-id: svn+ssh://svn.freebsd.org/ports/head@526103 35697150-7ecd-e111-bb59-0022644237b5
|
I've also reported this. Maybe in the wrong repo, though |
|
Please try PR #16 ! I've thrown out the old POSIX per process timer backend. Now, kqueue EVFILT_TIMER is used exclusively. So no more limit of 32 timerfd's when using |
|
#16 works fine for me: CPU usage is normal after removing workaround. Tested on Sway + Xwayland and xf86-input-libinput on FreeBSD 13.0-CURRENT. |
|
Yep, works great for me as well so far! Nice! |
|
This should hopefully be fixed by PR #16, please let me know if I missed something! |
Abi is backward compatible: https://abi-laboratory.pro/tracker/timeline/wayland/ Port changes: - Allow memfd_create on FreeBSD 13 for sealing - Drop ms_timeout workaround in favor of upstream fix[1] - Drop posix_fallocate patch as it was disabled in r455878 - Adjust posix_fallocate comment to improve clarity - Temporarily revert event loop update until epoll-shim#15 [2] is fixed [1]: https://gitlab.freedesktop.org/wayland/wayland/commit/75d14834570b [2]: jiixyj/epoll-shim#15 Build tested on: 11.3 aarch64 11.3 amd64 11.3 armv6 11.3 i386 12.0 amd64 12.0 i386 12.1 aarch64 12.1 amd64 12.1 armv6 12.1 armv7 12.1 i386 13.0 amd64 13.0 i386 Base GCC 4.2.1 (mimics powerpc*, mips*, riscv64) Run tested with: multimedia/libva-intel-driver multimedia/mpv www/firefox + MOZ_ENABLE_WAYLAND x11-servers/xwayland-devel x11-wm/cage x11-wm/sway x11/wl-clipboard PR: 244059 Submitted by: jbeich Tested by: manu Reviewed by: manu Approved by: x11 (bapt) Differential Revision: https://reviews.freebsd.org/D23643
With wayland 1.18 there's a new event loop update that would've fixed the same issue as #8 :D but now there's 100% CPU consumption in wlroots based compositors at least. Here's a dtrace flamegraph, lots of time spent in
poll,keventandktimer_settime…The text was updated successfully, but these errors were encountered: