From: Peter Williams <peterw@aurema.com>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Valdis.Kletnieks@vt.edu, Andrew Morton <akpm@osdl.org>,
Netdev <netdev@oss.sgi.com>, Greg KH <greg@kroah.com>,
Ingo Molnar <mingo@elte.hu>, Jeff Garzik <jgarzik@pobox.com>,
linux-kernel@vger.kernel.org
Subject: Re: MSEC_TO_JIFFIES is messed up...
Date: Thu, 13 May 2004 09:33:48 +1000 [thread overview]
Message-ID: <40A2B45C.7070206@aurema.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0405121255170.11950@bigblue.dev.mdolabs.com>
Davide Libenzi wrote:
> On Wed, 12 May 2004 Valdis.Kletnieks@vt.edu wrote:
>
>
>>On Wed, 12 May 2004 21:33:49 +0200, Ingo Molnar said:
>>
>>>* Jeff Garzik <jgarzik@pobox.com> wrote:
>>>
>>>
>>>>>Woah, that's new. And wrong. The code in include/asm-i386/param.h that
>>>>>says:
>>>>> # define JIFFIES_TO_MSEC(x) (x)
>>>>> # define MSEC_TO_JIFFIES(x) (x)
>>>>>
>>>>>Is not correct. Look at kernel/sched.c for verification of this :)
>>>>
>>>>
>>>>Yes, that is _massively_ broken.
>>>
>>>why is it wrong?
>>
>>If the kernel jiffie is anything other than exactly 1 msec, you're screwed...
>
>
> I believe they were talking about include/asm-i386/param.h
> ^^^^^^^^
There's sometimes a need to change HZ on i386 systems. Specifically,
some IDE drives are unable to safely use DMA (this is documented in one
of the Kconfig files). Without DMA for the IDE drives many systems
experience (a lot of) missed interrupts which can lead to (among other
things) lost ticks and very erratic and unpredictable behaviour from
input devices such as the mouse.
Also, if defined in terms of HZ only one definition of these macros
would be required rather than one for each architecture.
Peter
--
Dr Peter Williams, Chief Scientist peterw@aurema.com
Aurema Pty Limited Tel:+61 2 9698 2322
PO Box 305, Strawberry Hills NSW 2012, Australia Fax:+61 2 9699 9174
79 Myrtle Street, Chippendale NSW 2008, Australia http://www.aurema.com
next prev parent reply other threads:[~2004-05-12 23:33 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20040512020700.6f6aa61f.akpm@osdl.org>
[not found] ` <20040512181903.GG13421@kroah.com>
2004-05-12 18:42 ` MSEC_TO_JIFFIES is messed up Jeff Garzik
2004-05-12 19:33 ` Ingo Molnar
2004-05-12 19:47 ` Valdis.Kletnieks
2004-05-12 19:56 ` Davide Libenzi
2004-05-12 20:07 ` Valdis.Kletnieks
2004-05-12 20:28 ` Ingo Molnar
2004-05-12 20:35 ` Ingo Molnar
2004-05-12 20:50 ` Ingo Molnar
2004-05-12 21:03 ` Valdis.Kletnieks
2004-05-12 21:33 ` Davide Libenzi
2004-05-12 21:07 ` Andrew Morton
2004-05-12 21:17 ` Ingo Molnar
2004-05-12 22:18 ` William Lee Irwin III
2004-05-13 17:38 ` Paul Wagland
2004-05-13 19:11 ` Andrew Morton
2004-05-13 19:19 ` Jeff Garzik
2004-05-13 22:40 ` Andrew Morton
2004-05-13 22:40 ` Andrew Morton
2004-05-13 22:41 ` Andrew Morton
2004-05-13 23:02 ` Jeff Garzik
2004-05-13 19:50 ` Paul Wagland
2004-05-12 23:33 ` Peter Williams [this message]
2004-05-12 19:49 ` Davide Libenzi
2004-05-12 20:03 ` Ingo Molnar
2004-05-12 20:18 ` Valdis.Kletnieks
2004-05-12 20:20 ` Andrew Morton
2004-05-12 20:24 ` Jeff Garzik
2004-05-12 20:35 ` Andrew Morton
2004-05-12 20:44 ` Jeff Garzik
2004-05-12 21:03 ` Sridhar Samudrala
2004-05-12 20:32 ` Greg KH
2004-05-12 20:38 ` William Lee Irwin III
2004-05-12 20:47 ` Andrew Morton
2004-05-12 20:58 ` Jeff Garzik
2004-05-12 20:59 ` William Lee Irwin III
2004-05-12 20:55 ` Ingo Molnar
2004-05-12 21:01 ` Davide Libenzi
2004-05-12 21:12 ` Ingo Molnar
2004-05-12 21:40 ` Davide Libenzi
2004-05-12 21:49 ` Zan Lynx
2004-05-12 22:05 ` Roland Dreier
2004-05-12 21:56 ` Zan Lynx
2004-05-12 21:39 ` J. Bruce Fields
2004-05-12 21:55 ` Andreas Schwab
2004-05-12 22:07 ` J. Bruce Fields
2004-05-16 3:48 ` Chris Wedgwood
2004-05-16 12:10 ` Paul Wagland
2004-05-12 20:17 ` Jeff Garzik
2004-05-12 20:54 ` Bill Rugolsky Jr.
2004-05-12 22:44 ` Bill Rugolsky Jr.
2004-05-12 20:40 Jan Olderdissen
2004-05-12 20:46 ` Jeff Garzik
2004-05-12 20:49 ` Andreas Schwab
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=40A2B45C.7070206@aurema.com \
--to=peterw@aurema.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=akpm@osdl.org \
--cc=davidel@xmailserver.org \
--cc=greg@kroah.com \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=netdev@oss.sgi.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).