Re: [patch] timer: Add a mod_timer_msec() API function

From: Arjan van de Ven
Date: Mon Nov 23 2009 - 09:49:31 EST


On Mon, 23 Nov 2009 09:26:48 +0100
Ingo Molnar <mingo@xxxxxxx> wrote:
>
> This code first rounds to 1 second - and if that doesnt fall within
> the slack window it rounds to the (rather aribtrary) rounding of 16
> jiffies.
>
> I'd suggest to use up the slack to its maximum, by rounding up modulo
> the largest power-of-2 value that still fits into the slack.
>
> So if slack is 30, the rounding is 16. If slack is 5, the rounding is
> 4, etc.

well.. the point of the rounding is that there is a maximum likelyhood
that OTHER timers align.

I suppose what you suggest would do that too; need to think of a clever
way to not make that expensive
(after coffee I'll look at if xor + find first bit will work ;-)

>
> Ingo


--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
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/