[lkml]   [1999]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectSince 2.3.20: APIC timer calibration race + patch
    Linus, Ingo,

    Got it, finally! Since APIC code rewrite in 2.3.20, there was an
    annoying problem with APIC timer calibration, which tended to
    underestimate the clock heavily (such as getting half of its real value),
    which in turn ended in APIC timer interrupts being asserted too frequently
    (with all nasty effects resulting).

    It turned out that there is a race condition in get_8254_timer_count(),
    which accesses 8254's ports directly, using no mutex means even though
    interrupts are enabled on all CPUS at this stage, and regardless of
    timer_interrupt() accessing the very same port. Looks like a simple
    overlook, though, as timer_interrupt() has all necessary bits already in

    With the attached patch, get_8254_timer_count() has them too. Apart from
    being "obviously correct", the patch has been tested across several
    reboots and the calibrated APIC clock rates were within 1e-5 accuracy.
    The same accuracy was observed when comparing NMI and LOC interrupt
    counters after about two days of uptime. All tests were performed on a
    dual-P5MMX/233 system using the i430HX chipset, running 2.3.31.


    + Maciej W. Rozycki, Technical University of Gdansk, Poland +
    + e-mail:, PGP key available +
    [unhandled content-type:application/octet-stream]
     \ /
      Last update: 2005-03-22 13:55    [W:0.023 / U:6.124 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site