Page MenuHomeFreeBSD

When processing an IPI, use the correct current time in hardclockintr()
AcceptedPublic

Authored by jtl on Mar 24 2018, 2:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 24 2025, 2:56 AM
Unknown Object (File)
Nov 21 2025, 3:45 AM
Unknown Object (File)
Nov 11 2025, 1:54 AM
Unknown Object (File)
Nov 9 2025, 3:23 PM
Unknown Object (File)
Nov 9 2025, 7:21 AM
Unknown Object (File)
Nov 3 2025, 1:57 AM
Unknown Object (File)
Oct 26 2025, 10:35 AM
Unknown Object (File)
Oct 23 2025, 3:06 AM
Subscribers

Details

Summary

When processing an IPI (which is used by remote CPUs to cause the local CPU to reschedule its event timer), the next timer event was scheduled relative to a stale time. This could result in scheduling the event too far in the future.

The fix is to use the correct time.

Test Plan

I ran this against a test which measured the delay encountered by direct timeouts. With this change, the number of unexpected delays appeared to be reduced.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 15772
Build 15784: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Mar 24 2018, 3:03 PM
sys/kern/kern_clocksource.c
145

On which platform is this problem occurring?
Does it help to declare "now" volatile?
Why are you not setting state->now at this point?
Did you print the difference between "now" and "sbinuptime()" ?