]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
kqnotify: drop EV_CLEAR (edge triggering)
authorEric Wong <e@80x24.org>
Fri, 6 Oct 2023 09:46:00 +0000 (09:46 +0000)
committerEric Wong <e@80x24.org>
Fri, 6 Oct 2023 21:06:51 +0000 (21:06 +0000)
I'm not entirely certain how it works with the way we use
kevent.  I do know IO::KQueue has hard-coded kevent retrievals
to 1000 events so it's conceivable we'd end up missing wakeups
as we don't loop or requeue in callers.  So just rely on the
*BSD kernel to provided requeue behavior for us by using
level-triggering.

In any case, this seems to workaround t/dir_idle.t failures
on Dragonfly due to a tmpfs bug in all versions up to v6.4.

lib/PublicInbox/KQNotify.pm

index 2efa887d45800aaa67574c3336fadbde06ba11f0..1689f4cc4a2641c94c341b6756e1c11a6f31535d 100644 (file)
@@ -26,7 +26,7 @@ sub watch {
        my $ident = fileno($w->[2]) // die "BUG: bad fileno $w->[2]: $!";
        $self->{dskq}->{kq}->EV_SET($ident, # ident (fd)
                EVFILT_VNODE, # filter
-               EV_ADD | EV_CLEAR, # flags
+               EV_ADD, # flags
                $mask, # fflags
                0, $dir_delete); # data, udata
        $self->{watch}->{$ident} = $w;