I've seen different formulas for doing interval arithmetic,
and (not) handling wraparound.
For instance, in as_antic_expired()
::
long delta_jif;
delta_jif = jiffies - ad->antic_start;
if (unlikely(delta_jif < 0)) delta_jif = -delta_jif;
::
, which seems incorrect to me. (it could alter the preditive powers
of the scheduler in mysterious ways ;-)
(A different calculation is performed at other places.)
Jiffies wrap around depending on the HZ value (but still, intervals above INT_MAX should be relatively rare), and the jiffies start value
will cause the first wrap @ 5 min after booting, so that would show.
Could this be a jiffies wraparound bug ?
I've seen different formulas for doing interval arithmetic,
and (not) handling wraparound.
For instance, in as_antic_expired()
::
long delta_jif;
delta_jif = jiffies - ad->antic_start;
delta_ jif = -delta_jif;
if (unlikely(delta_jif < 0))
::
, which seems incorrect to me. (it could alter the preditive powers
of the scheduler in mysterious ways ;-)
(A different calculation is performed at other places.)
Jiffies wrap around depending on the HZ value (but still, intervals above INT_MAX should be relatively rare), and the jiffies start value
will cause the first wrap @ 5 min after booting, so that would show.
My 2 cents,
AvK