From: Arjan van de Ven <arjan@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org, alan@linux.intel.com
Subject: Re: [patch] timer: Add a mod_timer_msec() API function
Date: Mon, 23 Nov 2009 06:51:08 -0800 [thread overview]
Message-ID: <20091123065108.1fd78779@infradead.org> (raw)
In-Reply-To: <20091123082648.GB13186@elte.hu>
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
next prev parent reply other threads:[~2009-11-23 14:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-22 23:41 [patch] timer: Add a mod_timer_msec() API function Arjan van de Ven
2009-11-22 23:42 ` Arjan van de Ven
2009-11-23 8:26 ` Ingo Molnar
2009-11-23 14:51 ` Arjan van de Ven [this message]
2009-11-23 17:19 ` Thomas Gleixner
2009-11-24 10:14 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091123065108.1fd78779@infradead.org \
--to=arjan@infradead.org \
--cc=alan@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox