Messages in this thread |  | | Date | Mon, 23 Nov 2009 06:51:08 -0800 | | From | Arjan van de Ven <> | | Subject | Re: [patch] timer: Add a mod_timer_msec() API function |
| |
On Mon, 23 Nov 2009 09:26:48 +0100 Ingo Molnar <mingo@elte.hu> 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
|  |