]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sleepqueue(9): Remove sbinuptime() from sleepq_timeout().
authorAlexander Motin <mav@FreeBSD.org>
Sun, 3 Oct 2021 00:57:55 +0000 (20:57 -0400)
committerAlexander Motin <mav@FreeBSD.org>
Sun, 3 Oct 2021 01:08:41 +0000 (21:08 -0400)
commit6df1359e5542f69179c142be1ea099d447e273d1
tree0b1165ab1c1ec88dc732991782e63a89d03e825d
parent9acea16404117f2f54475640ff036c12130707d8
sleepqueue(9): Remove sbinuptime() from sleepq_timeout().

Callout c_time is always bigger or equal than the scheduled time.  It
is also smaller than sbinuptime() and can't change while the callback
is running.  So we reliably can use it instead of sbinuptime() here.
In case there was a race and the callout was rescheduled to the later
time, the callback will be called again.

According to profiles it saves ~5% of the timer interrupt time even
with fast TSC timecounter.

MFC after: 1 month
sys/kern/subr_sleepqueue.c