[Bug 264867] kevent EVFILT_TIMER, timer expiration with twice the period

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 30 Jun 2022 18:26:47 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264867

--- Comment #8 from Mark Johnston <markj@FreeBSD.org> ---
Created attachment 235005
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=235005&action=edit
possible bug fix

Could you please give this patch a try?  It solves the problem for me.  I think
testing this would be more useful than the other things I suggested so far
(pinning threads, etc.).

I think it'll apply to 13.1 and 12.3 without any adjustment.

Basically, when scheduling a callout on a different CPU, there is a small race
which can cause the event timer to be programmed incorrectly, resulting in
delayed processing of events.  Your excellent test program triggers this
readily on one of my systems with many CPUs; over time the scheduler migrates
threads away from the "home" CPU selected during knote initialization, so the
window for this race is opened.

-- 
You are receiving this mail because:
You are the assignee for the bug.