Re: MSEC_TO_JIFFIES is messed up...

From: Paul Wagland
Date: Thu May 13 2004 - 15:03:32 EST

On May 13, 2004, at 21:11, Andrew Morton wrote:

Paul Wagland <paul@xxxxxxxxxxx> wrote:
This changes behaviour when HZ==(z)000

((x) * 1000) / (z)000 to (((x) + (z) - 1)/(z))

i.e. for x=1, z=2 this goes from ((1)*1000)/2000)=0 to (((1)+(2)-1)/2)=1

hm, so you're saying that we now round 0.5 up to 1 rather than down to zero?

More precisely, we round .x up, where before it was rounded down, but yeah, _and_ only when HZ is a multiple of 1000, and greater than 1000. This is also only the case for the patch as proposed by wli, currently I don't know of any architectures that have a HZ of 2000 or more... but I just note that it _is_ a behaviour change in those cases, whether or not it is important is for other people to decide :-)


Attachment: PGP.sig
Description: This is a digitally signed message part