[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091123065108.1fd78779@infradead.org>
Date: Mon, 23 Nov 2009 06:51:08 -0800
From: Arjan van de Ven <arjan@...radead.org>
To: Ingo Molnar <mingo@...e.hu>
Cc: Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org,
alan@...ux.intel.com
Subject: Re: [patch] timer: Add a mod_timer_msec() API function
On Mon, 23 Nov 2009 09:26:48 +0100
Ingo Molnar <mingo@...e.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists