Bug 278365 - Linuxulator is missing EPOLLEXCLUSIVE support
Summary: Linuxulator is missing EPOLLEXCLUSIVE support
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-emulation (Nobody)
URL:
Keywords:
Depends on:
Blocks: 247219
  Show dependency treegraph
 
Reported: 2024-04-14 15:45 UTC by Alex S
Modified: 2024-10-06 18:57 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex S 2024-04-14 15:45:06 UTC
That affects a few video games from Valve, with Dota 2 and Counter-Strike 2 being the most notable.
Comment 1 Ed Maste freebsd_committer freebsd_triage 2024-04-15 16:23:52 UTC
From Linux's epoll_ctl man page:

              Sets an exclusive wakeup mode for the epoll file
              descriptor that is being attached to the target file
              descriptor, fd.  When a wakeup event occurs and multiple
              epoll file descriptors are attached to the same target
              file using EPOLLEXCLUSIVE, one or more of the epoll file
              descriptors will receive an event with epoll_wait(2).  The
              default in this scenario (when EPOLLEXCLUSIVE is not set)
              is for all epoll file descriptors to receive an event.
              EPOLLEXCLUSIVE is thus useful for avoiding thundering herd
              problems in certain scenarios.

"one or more of the epoll file descriptors will receive an event" implies that we may be able to provide a naive but conforming implementation that just ignores the flag (at least initially). Are you able to apply a patch, build a kernel, and test?
Comment 2 Alex S 2024-04-15 16:46:59 UTC
(In reply to Ed Maste from comment #1)

> we may be able to provide a naive but conforming implementation that just ignores the flag (at least initially).

That should be enough for the aforementioned apps. I'm already doing just that, in fact.

> Are you able to apply a patch, build a kernel, and test?

Yes, I'm able to do that.
Comment 3 Ed Maste freebsd_committer freebsd_triage 2024-10-06 18:57:13 UTC
(In reply to Alex S from comment #2)
It turns out there is an old patch from trasz@ in https://reviews.freebsd.org/D23172. I've rebased it now.