| To: | Andrew Morton <akpm@xxxxxxxx> |
|---|---|
| Subject: | Re: MSEC_TO_JIFFIES is messed up... |
| From: | Ingo Molnar <mingo@xxxxxxx> |
| Date: | Wed, 12 May 2004 22:55:38 +0200 |
| Cc: | davidel@xxxxxxxxxxxxxxx, jgarzik@xxxxxxxxx, greg@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx |
| In-reply-to: | <20040512132050.6eae6905.akpm@osdl.org> |
| References: | <20040512020700.6f6aa61f.akpm@osdl.org> <20040512181903.GG13421@kroah.com> <40A26FFA.4030701@pobox.com> <20040512193349.GA14936@elte.hu> <Pine.LNX.4.58.0405121247011.11950@bigblue.dev.mdolabs.com> <20040512200305.GA16078@elte.hu> <20040512132050.6eae6905.akpm@osdl.org> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.4.1i |
* Andrew Morton <akpm@xxxxxxxx> wrote:
> #if HZ=1000
> #define MSEC_TO_JIFFIES(msec) (msec)
> #define JIFFIES_TO_MESC(jiffies) (jiffies)
> #elif HZ=100
> #define MSEC_TO_JIFFIES(msec) (msec * 10)
> #define JIFFIES_TO_MESC(jiffies) (jiffies / 10)
> #else
> #define MSEC_TO_JIFFIES(msec) ((HZ * (msec) + 999) / 1000)
> #define JIFFIES_TO_MSEC(jiffies) ...
> #endif
the HZ=100 define is broken. (it's correct in the -A2 patch i just
sent.)
why the +999 rounding up in the generic case?
Ingo
|
| Previous by Date: | Re: MSEC_TO_JIFFIES is messed up..., William Lee Irwin III |
|---|---|
| Next by Date: | Re: Msg reply, Trevor |
| Previous by Thread: | Re: MSEC_TO_JIFFIES is messed up..., William Lee Irwin III |
| Next by Thread: | Re: MSEC_TO_JIFFIES is messed up..., Jeff Garzik |
| Indexes: | [Date] [Thread] [Top] [All Lists] |