From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 192731F47A for ; Fri, 6 Oct 2023 09:46:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1696585618; bh=945UY2Ptfg8bTVGx2mS8rcen1ZtmsfXSL2tVq78Rfo0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Nwz/oF89eRgfcj6jxCA4svIoYbCj4zMXSQX1zPpeZz7WTYhXyTAZFGuCjS/nQ5AZb 3DGqDHt6AGv0GBeJ2WM0AE8f7nq8cMcyIhJgw+blIL3WM3CnhgWVOnTchDqTX8z+F/ ebjhLHawjLZEZL4JBVHMzRCzdykBmlLLjdbcR0L8= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/5] kqnotify: drop EV_CLEAR (edge triggering) Date: Fri, 6 Oct 2023 09:46:00 +0000 Message-ID: <20231006094604.95809-2-e@80x24.org> In-Reply-To: <20231006094604.95809-1-e@80x24.org> References: <20231006094604.95809-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/KQNotify.pm b/lib/PublicInbox/KQNotify.pm index 2efa887d..1689f4cc 100644 --- a/lib/PublicInbox/KQNotify.pm +++ b/lib/PublicInbox/KQNotify.pm @@ -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;