lkml.org 
[lkml]   [2003]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Increasing HZ (patch for HZ > 1000)
From
Date
> Well, on i386 we only run with HZ=100 and HZ=1000, so bug is latent,
> but if you can find nice way to rewrite it without the bug, it would
> probably be worth fixing.

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).

Jean-Marc

--
Jean-Marc Valin, M.Sc.A., ing. jr.
LABORIUS (http://www.gel.usherb.ca/laborius)
Université de Sherbrooke, Québec, Canada
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.112 / U:11.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site