From: Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca>
To: "Martin J. Bligh" <mbligh@aracnet.com>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: Increasing HZ (patch for HZ > 1000)
Date: Fri, 12 Dec 2003 03:00:53 -0500 [thread overview]
Message-ID: <1071216053.4187.22.camel@idefix.homelinux.org> (raw)
In-Reply-To: <1288980000.1071126438@[10.10.2.4]>
[-- Attachment #1: Type: text/plain, Size: 859 bytes --]
Just one more thing about the patch I sent. I think it addresses
something unclean in the bogomips computation. For example, in
arch/i386/kernel/cpu/proc.c, you have:
seq_printf(m, "\nbogomips\t: %lu.%02lu\n\n",
c->loops_per_jiffy/(500000/HZ),
(c->loops_per_jiffy/(5000/HZ)) % 100);
It's clear that for any case where 5000/HZ is not an integer, the
bogomips decimals will be wrong and if 500000/HZ isn't an integer, the
bogomips integer part will be wrong.
For example on a 2 GHz processor with a 4000 bogomips value and HZ=1200,
the code above will produce 3996.66 instead of 4000. Of course, as soon
as HZ goes above 5000, you have a divide by zero right at compile time.
Jean-Marc
--
Jean-Marc Valin, M.Sc.A., ing. jr.
LABORIUS (http://www.gel.usherb.ca/laborius)
Université de Sherbrooke, Québec, Canada
[-- Attachment #2: Ceci est une partie de message numériquement signée. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2003-12-12 8:02 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-11 6:05 Increasing HZ (patch for HZ > 1000) Jean-Marc Valin
2003-12-11 7:07 ` Martin J. Bligh
2003-12-11 7:15 ` Jean-Marc Valin
2003-12-11 7:18 ` Martin J. Bligh
2003-12-11 17:18 ` Gene Heskett
2003-12-11 17:33 ` Martin J. Bligh
2003-12-11 18:10 ` Richard B. Johnson
2003-12-11 19:14 ` Gene Heskett
2003-12-11 18:35 ` Gene Heskett
2003-12-12 22:08 ` Pavel Machek
2003-12-12 22:57 ` Jean-Marc Valin
2003-12-12 23:18 ` Måns Rullgård
2003-12-12 23:40 ` Pavel Machek
2003-12-13 2:25 ` Måns Rullgård
2003-12-16 3:04 ` john stultz
2003-12-16 5:20 ` Mitchell Blank Jr
2003-12-14 1:05 ` bill davidsen
2003-12-14 4:48 ` Pat Erley
2003-12-11 7:30 ` Nick Piggin
2003-12-11 8:25 ` Tim Schmielau
2003-12-12 8:00 ` Jean-Marc Valin [this message]
2003-12-12 22:10 ` Pavel Machek
2003-12-12 22:50 ` Jean-Marc Valin
2004-01-03 18:16 ` Bill Davidsen
[not found] ` <010f01c415a4_27033d00_d100000a@sbs2003.local>
2004-04-06 13:00 ` Pavel Machek
2003-12-11 19:22 Grover, Andrew
2003-12-12 22:31 ` Jamie Lokier
2003-12-12 22:58 ` Vojtech Pavlik
2003-12-12 23:45 ` Jamie Lokier
2003-12-13 8:36 ` Vojtech Pavlik
2003-12-12 15:52 Vincent Legoll
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1071216053.4187.22.camel@idefix.homelinux.org \
--to=jean-marc.valin@usherbrooke.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@aracnet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).