lkml.org 
[lkml]   [2009]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2009-11-23 15:51    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog