Re: Increasing HZ (patch for HZ > 1000)

Bill Davidsen
2004-01-03T18:16:23Z

Jean-Marc Valin wrote:

> Actually, the way I rewrote it in the patch is immune to that kind of
> problem:
>
> seq_printf(m, "\nbogomips\t: %lu.%02lu\n\n",
> HZ*(c->loops_per_jiffy>>3)/62500,
> (HZ*(c->loops_per_jiffy>>3)/625)%100);
>
> It will work correctly for any HZ up to ~34000 bogomips (using 32-bit
> arithmetic).

I think it's likely any CPU with 34000 bogomips will have more than 32
bit ;-)

--
bill davidsen <davidsen@tmr.com>
CTO TMR Associates, Inc
Doing interesting things with small computers since 1979