Re: [patch 2/7] timer: Remove FIFO guarantee

From: George Spelvin
Date: Tue Jun 09 2015 - 01:39:47 EST


Thomas Gleixner wrote:
> It does. Depending on when you enqueue the timer because the thing is
> calculated from the delta (expires - jiffies).

Ah, right. If slack > 0, the slack amount is absolute and the rounding
will be consistent.

But if slack < 0, which is the default, it's a percentage of remaining
jiffies. Since slack only delays timeouts, an earlier-scheduled
timeout could easily be delayed more.

(There are only six calls to set_timer_slack() to change the default
to something positive in the kernel.)

>> I'm not disagreeing with the change, but it's not clear to me that
>> it's as safe as you think.

> After thinking more about it, I'm even more sure that any code which
> relies on the FIFO "guarantee" is broken today.

Indeed, I am completely convinced. All I might request is a reassignment
of blame in the commit message.



Thank you for your comments on my other blue-sky ideas, too.

I need to look into why we're using wheels, and what the point is.
How much of an advantage do they have over an efficient priority queue
like a pairing heap?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/