https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214987

--- Comment #3 from Conrad Meyer <c...@freebsd.org> ---
I see.  You are reusing the timer with ident=1.  Hm.  With:

@@ -25,7 +25,7 @@
     int n = ::kevent(kq, &event, 1, nullptr, 0, nullptr);
     assert(n == 0);

-    EV_SET(&event, 1, EVFILT_TIMER, flags, fflags, 1000, nullptr);
+    EV_SET(&event, 2, EVFILT_TIMER, flags, fflags, 1000, nullptr);
     n = ::kevent(kq, &event, 1, nullptr, 0, nullptr);
     assert(n == 0);

Two timers are attached, and the program indeed wakes up quickly:

CPU     ID                    FUNCTION:NAME
  1  64686                     kevent:entry 2017 Jan 11 20:06:00.530
  1  15060           filt_timerattach:entry 2017 Jan 11 20:06:00.530   
kn:fffff800286c4e00
  1  15061          filt_timerattach:return 2017 Jan 11 20:06:00.530   
kn:fffff800286c4e00 kc:fffff80005cb4200
  1  15061          filt_timerattach:return 2017 Jan 11 20:06:00.530   
return:0
  1  15058                 filt_timer:entry 2017 Jan 11 20:06:00.530   
kn:fffff800286c4e00 hint:0
  1  15059                filt_timer:return 2017 Jan 11 20:06:00.530   
return:0
  1  64686                     kevent:entry 2017 Jan 11 20:06:00.530
  1  15060           filt_timerattach:entry 2017 Jan 11 20:06:00.530   
kn:fffff800286c4e80
  1  15061          filt_timerattach:return 2017 Jan 11 20:06:00.530   
kn:fffff800286c4e80 kc:fffff80005cb4180
  1  15061          filt_timerattach:return 2017 Jan 11 20:06:00.530   
return:0
  1  15058                 filt_timer:entry 2017 Jan 11 20:06:00.530   
kn:fffff800286c4e80 hint:0
  1  15059                filt_timer:return 2017 Jan 11 20:06:00.530   
return:0
  1  64686                     kevent:entry 2017 Jan 11 20:06:00.530
  1  15064           filt_timerexpire:entry 2017 Jan 11 20:06:00.531   
kn:fffff800286c4e80
  1  15065          filt_timerexpire:return 2017 Jan 11 20:06:00.531   
return:fffff80004224a00
  3  15062           filt_timerdetach:entry 2017 Jan 11 20:06:00.531   
kn:fffff800286c4e80
  3  15063          filt_timerdetach:return 2017 Jan 11 20:06:00.531   
return:2
  3  15062           filt_timerdetach:entry 2017 Jan 11 20:06:00.532   
kn:fffff800286c4e00
  3  15063          filt_timerdetach:return 2017 Jan 11 20:06:00.532   
return:1

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to