path: root/sys/sys/_lockmgr.h
diff options
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-10-28 08:22:58 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2021-10-28 21:31:14 +0000
commitae750fbac72387c05c8e13623c2465b20497b4be (patch)
treee73137f32689cddbbe2e3ef31f4978bcc59d9fff /sys/sys/_lockmgr.h
parenta901f2af587f9cb068e2fca6b62f324bdde471d8 (diff)
kern_tc.c: Scaling/large delta recalculationHEADmain
This change is a slight performance optimization for systems with a slow 64-bit division. The th->th_scale and th->th_large_delta values only depend on the timecounter frequency and the th->th_adjustment. The timecounter frequency of a timehand only changes when a new timecounter is activated for the timehand. The th->th_adjustment is only changed by the NTP second update. The NTP second update is not done for every call of tc_windup(). Move the code block to recalculate the scaling factor and the large delta of a timehand to the new helper function recalculate_scaling_factor_and_large_delta(). Call recalculate_scaling_factor_and_large_delta() when a new timecounter is activated and a NTP second update occurred. MFC after: 1 week
Diffstat (limited to 'sys/sys/_lockmgr.h')
0 files changed, 0 insertions, 0 deletions