On 11/3/26 11:03, Andrey Zhadchenko wrote: > mod_timer() takes an absolute jiffies value, but both callers pass a > relative one. After about 5 min uptime this causes the timer to fire > and re-arm on every tick. This has not exploded because we still have > checked pb->deadline_jiffies each time.
Hi Andrey, The fix is right, the "5 min" is not. INITIAL_JIFFIES is (unsigned long)(unsigned int)(-300*HZ): on 64-bit jiffies start at about 2^32 - 300*HZ, and after 5 minutes only the low 32 bits wrap, the unsigned long keeps growing. The relative values here are at most 5h*HZ, below the start value, so they are in the past from boot, and the timer fires and re-arms on every tick whenever a write is delayed. The late first expiry before the wrap exists on 32-bit only. Maybe: mod_timer() takes an absolute jiffies value, but both callers pass a relative one, which is always in the past. The timer fires and re-arms on every tick while a write is delayed. It has worked so far because pb_timer_func() checks pb->deadline_jiffies each time. With that: Reviewed-by: Konstantin Khorenko <[email protected]> -- Konstantin Khorenko, Virtuozzo Linux Kernel Team _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
