public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Vandrovec <vandrove@vc.cvut.cz>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/7] more HPET fixes and enhancements
Date: Wed, 19 Oct 2005 17:56:18 +0200	[thread overview]
Message-ID: <43566CA2.4090002@vc.cvut.cz> (raw)
In-Reply-To: <Pine.HPX.4.33n.0510191540170.2146-100000@studcom.urz.uni-halle.de>

Clemens Ladisch wrote:
> Petr Vandrovec wrote:
> 
>>Clemens Ladisch wrote:
>>
>>>However, I've patched my kernel to initialize the HPET manually
>>>because my BIOS doesn't bother to do it at all.  A quick Google search
>>>shows that in most cases where the BIOS _does_ bother, the third timer
>>>(which is the only free one after system timer and RTC have grabbed
>>>theirs) didn't get initialized and is still set to interrupt 0 (which
>>>isn't actually supported by most HPET hardware).
>>>
>>>This means that hpet.c must initialize the interrupt routing register
>>>in this case.  I'll write a patch for this.
>>
>>I'm using attached diff.
> 
> 
> The other changes of your patch are already in the -mm kernel.
> 
> 
>>But I gave up on HPET.  On VIA periodic mode is hopelessly broken,
> 
> 
> I've heard it works with timer 0, and the capability bit on timer 1 is
> just wrong.

Nope.  Periodic mode works (I've made my tests on timer #2), you can just
set only period (through way which sets value according to the spec), and
you cannot set current value (at least I do not know how).  So I can
program VIA hardware to generate periodic interrupt, there is just
unavoidable delay up to 5 minutes. I've worked around by setting period
to 1 tick, so in 5 minutes value and main timer synchronize, and if
timer is not stopped after that then it stays synchronized with main timer.

>>And fixing this would add at least 1.5us to the interrupt handler,
>>and it seems quite lot to me...
> 
> 
> I didn't measure how much reading the RTC registers costs us, but
> those aren't likely to be faster.
> 
> I'm thinking of a different approach:  Assuming that such a big delay
> almost never actually does happen, we run a separate watchdog timer
> (using a kernel timer that is guaranteed to work) at a much lower
> frequency to check whether the real timer got stuck.  This trades off
> the HPET register read against the timer_list overhead (and that we
> still lose _some_ interrupts when the worst case happens).

It would work for VMware's use of /dev/rtc if number of missed interrupts
will be reported on next read.  Otherwise it might be a problem for
keeping time between host and virtual machines in sync.
								Petr


  reply	other threads:[~2005-10-19 15:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.58.0510180821140.10054@shark.he.net>
2005-10-19  7:27 ` [PATCH 0/7] more HPET fixes and enhancements Clemens Ladisch
2005-10-19 10:00   ` Petr Vandrovec
2005-10-19 14:09     ` Clemens Ladisch
2005-10-19 15:56       ` Petr Vandrovec [this message]
2005-10-19 13:49   ` Clemens Ladisch
2005-10-19 15:08 Pallipadi, Venkatesh
  -- strict thread matches above, loose matches on Subject: below --
2005-10-04 12:41 Clemens Ladisch
2005-10-10 14:17 ` Bob Picco
2005-10-15  2:30 ` Randy.Dunlap
2005-10-17 16:30   ` Clemens Ladisch
2005-10-18  9:19     ` Takashi Iwai

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=43566CA2.4090002@vc.cvut.cz \
    --to=vandrove@vc.cvut.cz \
    --cc=clemens@ladisch.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    /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