Page MenuHomeFreeBSD

graphics/wayland: replace posix_fallocate hack with a proper fix
ClosedPublic

Authored by jbeich on Feb 15 2020, 3:48 PM.

Details

Test Plan

Builds fine 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)

Works fine on:

  • www/firefox + MOZ_ENABLE_WAYLAND
  • x11-servers/xwayland-devel
  • x11-wm/sway

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jbeich created this revision.Feb 15 2020, 3:48 PM

There are comments on the suggested patches upstream. Until those are resolved, this is not approved.

https://gitlab.freedesktop.org/wayland/wayland/merge_requests/61
Here is a link to the upstream pull request and discussion, it's also linked in the Makefile, but put it here as well.

manu added a subscriber: manu.Feb 15 2020, 4:02 PM

Looks promising, let's wait a bit for upstream to at least ack the patches.

Stalled until someone can reproduce the original issue. I dogfood XDG_RUNTIME_DIR=/var/run/$USER on tmpfs(5). Sway works fine even after changing XDG_RUNTIME_DIR to point to a directory on ZFS

manu added a comment.Feb 15 2020, 4:17 PM

Stalled until someone can reproduce the original issue. I dogfood XDG_RUNTIME_DIR=/var/run/$USER on tmpfs(5). Sway works fine even after changing XDG_RUNTIME_DIR to point to a directory on ZFS

With your patches you mean ? Because I recall that I needed to change it to a non-zfs filesystem not so long ago.

In D23696#520294, @manu wrote:

Stalled until someone can reproduce the original issue. I dogfood XDG_RUNTIME_DIR=/var/run/$USER on tmpfs(5). Sway works fine even after changing XDG_RUNTIME_DIR to point to a directory on ZFS

With your patches you mean ?

Without the hack and my patches from here. However, I can't rely on my QA alone as I have a number of patches against kernel/userland/ports/etc.

manu added a comment.Feb 15 2020, 4:33 PM
In D23696#520294, @manu wrote:

Stalled until someone can reproduce the original issue. I dogfood XDG_RUNTIME_DIR=/var/run/$USER on tmpfs(5). Sway works fine even after changing XDG_RUNTIME_DIR to point to a directory on ZFS

With your patches you mean ?

Without the hack and my patches from here. However, I can't rely on my QA alone as I have a number of patches against kernel/userland/ports/etc.

Ok, I'll try on my machine.

manu added a comment.Feb 15 2020, 7:11 PM
In D23696#520296, @manu wrote:
In D23696#520294, @manu wrote:

Stalled until someone can reproduce the original issue. I dogfood XDG_RUNTIME_DIR=/var/run/$USER on tmpfs(5). Sway works fine even after changing XDG_RUNTIME_DIR to point to a directory on ZFS

With your patches you mean ?

Without the hack and my patches from here. However, I can't rely on my QA alone as I have a number of patches against kernel/userland/ports/etc.

Ok, I'll try on my machine.

Works for me for XDG_RUNTIME_DIR on both tmpfs and zfs

jbeich updated this revision to Diff 68393.Feb 16 2020, 6:55 AM
jbeich edited the test plan for this revision. (Show Details)
  • Address upstream review

Anonymous memory is not backed by any filesystem, so posix_fallocate generally succeeds. I had to temporarily delete defined(HAVE_MEMFD_CREATE) and defined(__FreeBSD__) conditionals during testing.

jbeich updated this revision to Diff 68747.Feb 24 2020, 11:09 AM

Upstream has merged my PR:

  • Switch to patches with Signed-off-by
manu accepted this revision as: manu.Feb 24 2020, 3:40 PM
This revision is now accepted and ready to land.Feb 24 2020, 3:40 PM
zeising accepted this revision.Feb 24 2020, 7:49 PM

LGTM

This revision was automatically updated to reflect the committed changes.