Re: [PATCH] timers: consider slack value in mod_timer()

From: Thomas Gleixner
Date: Wed May 25 2011 - 06:57:40 EST


On Wed, 25 May 2011, Thomas Gleixner wrote:
> On Wed, 25 May 2011, Yong Zhang wrote:
> } else {
> - unsigned long now = jiffies;
> + long delta = expires - jiffies;
> +
> + if (delta < 256)
> + return expires;
>
> - /* No slack, if already expired else auto slack 0.4% */
> - if (time_after(expires, now))
> - expires_limit = expires + (expires - now)/256;
> + expires_limit = expires + (expires - now)/256;

That should be

+ expires_limit = expires + delta / 256;

of course.

--
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/