linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca>
To: Pavel Machek <pavel@ucw.cz>
Cc: "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 17:50:30 -0500	[thread overview]
Message-ID: <1071269429.4182.6.camel@idefix.homelinux.org> (raw)
In-Reply-To: <20031212221045.GB314@elf.ucw.cz>

[-- Attachment #1: Type: text/plain, Size: 633 bytes --]

> 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

[-- Attachment #2: Ceci est une partie de message numériquement signée. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2003-12-12 22:50 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
2003-12-12 22:10     ` Pavel Machek
2003-12-12 22:50       ` Jean-Marc Valin [this message]
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=1071269429.4182.6.camel@idefix.homelinux.org \
    --to=jean-marc.valin@usherbrooke.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@aracnet.com \
    --cc=pavel@ucw.cz \
    /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).