Re: MSEC_TO_JIFFIES is messed up...

From: Davide Libenzi
Date: Wed May 12 2004 - 14:52:06 EST


On Wed, 12 May 2004, Ingo Molnar wrote:

>
> * Jeff Garzik <jgarzik@xxxxxxxxx> wrote:
>
> > >Woah, that's new. And wrong. The code in include/asm-i386/param.h that
> > >says:
> > > # define JIFFIES_TO_MSEC(x) (x)
> > > # define MSEC_TO_JIFFIES(x) (x)
> > >
> > >Is not correct. Look at kernel/sched.c for verification of this :)
> >
> >
> > Yes, that is _massively_ broken.
>
> why is it wrong?

For HZ == 1000 it's fine, even if it'd better to explicitly make it HZ
dependent and let the compiler to discard them.



- Davide

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/