public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: george anzinger <george@mvista.com>
To: Russell King <rmk@arm.linux.org.uk>
Cc: Riley Williams <Riley@Williams.Name>,
	davidm@hpl.hp.com, Vojtech Pavlik <vojtech@suse.cz>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch] input: Fix CLOCK_TICK_RATE usage ...  [8/13]
Date: Tue, 17 Jun 2003 18:00:53 -0700	[thread overview]
Message-ID: <3EEFB9C5.4050300@mvista.com> (raw)
In-Reply-To: <20030617232113.J32632@flint.arm.linux.org.uk>

Russell King wrote:
> On Tue, Jun 17, 2003 at 11:11:46PM +0100, Riley Williams wrote:
> 
>>On most architectures, the said timer runs at 1,193,181.818181818 Hz.
> 
> 
> Wow.  That's more accurate than a highly expensive Caesium standard.
> And there's one inside most architectures?  Wow, we're got a great
> deal there, haven't we? 8)
> 
> 
>> > Please do not add CLOCK_TICK_RATE to the ia64 timex.h header file.
>>
>>It needs to be declared there. The only question is regarding the
>>value it is defined to, and it would have to be somebody with better
>>knowledge of the ia64 than me who decides that. All I can do is to
>>post a reasonable default until such decision is made.
> 
> 
> If this is the case, we have a dilema on ARM.  CLOCK_TICK_RATE has
> been, and currently remains (at Georges distaste) a variable on
> some platforms.  I shudder to think what this is doing to some of
> the maths in Georges new time keeping and timer code.
> 
So just what is it used for?  On the x86, the math on it is used 
mostly (aside from LATCH) to figure out the actual value of 1/HZ. 
This is then used to compute a more correct TICK_NSEC which is added 
to xtime each tick.  This usage of CLOCK_TICK_RATE just "beats it up" 
to see how close the hardware can get to the requested rate of 1/HZ. 
Since this code is in time.h and timex.h, it is shared with all the archs.

I submit that if it is not used to actually compute a LATCH value for 
the 1/HZ tick, it should just be some rather large value that more or 
less represents the granularity of the hardwares ability to generate 
1/HZ ticks.  Once it gets above about 100MHZ, I think it actually 
drops out of the calculations.  The last thing we want to do at this 
point is make it a variable.  (Nor do you want to put a -E in your cc 
command and take a look at what is produced for the conversion constants.)

If it is not possible to make it a constant, I think we need to 
revisit the timer conversion code as we would not only have a LOT of 
code bloat, but it would add far too much time to the conversions.

-- 
George Anzinger   george@mvista.com
High-res-timers:  http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml


  parent reply	other threads:[~2003-06-18  0:47 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-14 20:35 [patch] input: Implement device grabbing [1/13] Vojtech Pavlik
2003-06-14 20:36 ` [patch] input: Fix sunkbd keybit bitfield filling [2/13] Vojtech Pavlik
2003-06-14 20:37   ` [patch] input: Implement HID quirk for A4Tech mice [3/13] Vojtech Pavlik
2003-06-14 20:39     ` [patch] input: Add hiragana/katakana keys to atkbd.c [4/13] Vojtech Pavlik
2003-06-14 20:40       ` [patch] input: Add PCI PS/2 controller support [5/13] Vojtech Pavlik
2003-06-14 20:40         ` [patch] input: Turn numlock ON on HP HIL machines [6/13] Vojtech Pavlik
2003-06-14 20:41           ` [patch] input: Add keys for HP HIL [7/13] Vojtech Pavlik
2003-06-14 20:42             ` [patch] input: Fix CLOCK_TICK_RATE usage ... [8/13] Vojtech Pavlik
2003-06-14 20:43               ` [patch] input: Fix i8042 interrupts on I2000 ia64 machines [9/13] Vojtech Pavlik
2003-06-14 20:44                 ` [patch] input: Fix sending reports in USB HID [10/13] Vojtech Pavlik
2003-06-14 20:45                   ` [patch] input: Fix hiddev_ioctl() [11/13] Vojtech Pavlik
2003-06-14 20:45                     ` [patch] input: Fix minor errors in input-programming.txt [12/13] Vojtech Pavlik
2003-06-14 20:46                       ` [patch] input: Add Synaptics touchpad support [13/13] Vojtech Pavlik
2003-06-14 21:05               ` [patch] input: Fix CLOCK_TICK_RATE usage ... [8/13] Riley Williams
2003-06-14 21:14                 ` Vojtech Pavlik
2003-06-15 10:51                   ` Riley Williams
2003-06-16 18:57                     ` David Mosberger
2003-06-17 22:11                       ` Riley Williams
2003-06-17 22:19                         ` David Mosberger
2003-06-17 22:21                           ` Vojtech Pavlik
2003-06-17 22:34                             ` David Mosberger
2003-06-17 22:42                               ` Vojtech Pavlik
2003-06-17 22:48                                 ` Russell King
2003-06-17 22:53                                   ` Vojtech Pavlik
2003-06-19 12:13                                   ` David Woodhouse
2003-06-19 14:19                                     ` Russell King
2003-06-17 23:08                                 ` David Mosberger
2003-06-17 23:14                                   ` Vojtech Pavlik
2003-06-17 23:24                                     ` David Mosberger
2003-06-17 23:31                                       ` Vojtech Pavlik
2003-06-18  0:47                                         ` george anzinger
2003-06-25  8:03                                         ` Riley Williams
2003-06-25 17:20                                           ` David Mosberger
2003-06-25 17:56                                             ` Riley Williams
2003-06-25 18:49                                               ` David Mosberger
2003-06-25 19:58                                             ` Vojtech Pavlik
2003-06-25 20:09                                               ` David Mosberger
2003-06-25 20:25                                               ` Assorted warnings while building 2.5.73 J.C. Wren
2003-06-18 14:47                                       ` [patch] input: Fix CLOCK_TICK_RATE usage ... [8/13] Hollis Blanchard
2003-06-18 18:50                                         ` David Mosberger
2003-06-17 22:21                         ` Russell King
2003-06-17 22:38                           ` Vojtech Pavlik
2003-06-18  0:46                             ` george anzinger
2003-06-18  1:00                           ` george anzinger [this message]
2003-06-14 20:51         ` [patch] input: Add PCI PS/2 controller support [5/13] Oliver Neukum
2003-06-14 21:03           ` Vojtech Pavlik
2003-06-14 21:04           ` Russell King

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=3EEFB9C5.4050300@mvista.com \
    --to=george@mvista.com \
    --cc=Riley@Williams.Name \
    --cc=davidm@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=vojtech@suse.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