public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* x86_32 tsc/pit and hrtimers
@ 2008-10-07 22:41 Jeff Hansen
  2008-10-08 18:41 ` Chris Snook
  0 siblings, 1 reply; 23+ messages in thread
From: Jeff Hansen @ 2008-10-07 22:41 UTC (permalink / raw)
  To: torvalds, linux-kernel, mingo

Linus, Ingo, All,

I've been struggling with hrtimer support in 2.6.26.5 on an older 
x86_32/i386 system, and I'm wondering if there are any easy fixes that you
(or anyone else) would suggest.

Basically, this system does not print out the message:

"Switched to high resolution mode on CPU 0"

indicating that one-shot, hrtimers, etc. won't work, since high resolution
mode has not been enabled.  I've verified that hrtimers started with
hrtimer_start do not have the expected resolution further than 1/HZ.

This system does not have LAPIC, ACPI, or HPET, so really the only
clocksources I can use are TSC and PIT.  This should be fine (in theory,
unless it wasn't designed like that), but apparently the clocksource flags
are not initialized in such a way that one of them ever gets marked as
CLOCK_SOURCE_VALID_FOR_HRES.

The flow of the flags on each of these clocksources is as follows:

1) The flags on the TSC clocksource are CLOCK_SOURCE_IS_CONTINUOUS |
     CLOCK_SOURCE_MUST_VERIFY, which causes PIT to be used as the watchdog
     clocksource. (see kernel/time/clocksource.c:~171)
2) Around line 122 in kernel/time/clocksource.c, where most clocksources'
     flags usually get ORed with CLOCK_SOURCE_VALID_FOR_HRES, the PIT's do
     not because it is not CLOCK_SOURCE_IS_CONTINUOUS, and the TSC's do not
     also because the PIT (as the watchdog) is not
     CLOCK_SOURCE_IS_CONTINUOUS.

I get the same results on a new laptop booting into 32-bit Linux with hpet
and acpi disabled.

Can you please tell me if this is supposed to work, and I just have a
poorly configured kernel; or if TSC/PIT drivers were not designed to work
this way in the first place.  If it wasn't designed to do this, do you
have any tips on implementing this, since I'll be needing to do that?

-Jeff Hansen

---------------------------------------------------
"If someone's gotta do it, it might as well be me."

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2008-10-10 14:25 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-07 22:41 x86_32 tsc/pit and hrtimers Jeff Hansen
2008-10-08 18:41 ` Chris Snook
2008-10-08 19:46   ` Jeff Hansen
2008-10-08 20:25     ` Chris Snook
2008-10-08 21:43       ` [PATCH] " Jeff Hansen
2008-10-08 21:47         ` Randy.Dunlap
2008-10-08 21:47         ` Chris Snook
2008-10-08 21:56           ` Jeff Hansen
2008-10-09  7:14             ` Thomas Gleixner
2008-10-09 18:39               ` Chris Snook
2008-10-09 19:18                 ` Thomas Gleixner
2008-10-09 19:45                   ` Jeff Hansen
2008-10-09 19:53                     ` Thomas Gleixner
2008-10-09 20:45                       ` Alok kataria
2008-10-09 21:03                         ` Chris Snook
2008-10-09 21:18                           ` Jeff Hansen
2008-10-09 22:03                             ` Alok Kataria
2008-10-09 21:53                           ` Alok Kataria
2008-10-09 22:50                             ` Chris Snook
2008-10-09 23:22                               ` Alok Kataria
2008-10-09 23:37                                 ` Chris Snook
2008-10-10 14:24                                   ` Jeff Hansen
2008-10-09 17:20   ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox