cvs commit: src/sys/amd64/amd64 local_apic.c src/sys/i386/i386 local_apic.c

John Baldwin jhb at
Sat Aug 23 12:36:49 UTC 2008

jhb         2008-08-23 12:35:43 UTC

  FreeBSD src repository

  Modified files:
    sys/amd64/amd64      local_apic.c 
    sys/i386/i386        local_apic.c 
  SVN rev 182046 on 2008-08-23 12:35:43Z by jhb
  Adjust the handling the various timer frequencies when using the lapic
  timer.  Previously, the various divisors were fixed which meant that while
  it gave somewhat reasonable stathz, etc. at hz=1000, it went off the rails
  with any other hz value.  With these changes, we now pick a lapic timer hz
  based on the value of hz.  If hz is >= 1500, then the lapic timer runs at
  hz.  If 1500 hz >= 750, we run the lapic timer at hz * 2.  If hz < 750, we
  run at hz * 4.  We compute a divider at runtime to make stathz run as close
  to 128 as we can since stathz really wants to be run at something close to
  that frequency.  Profiling just runs on every clock tick.  So some examples:
  With hz = 100, the lapic timer now runs at 400 instead of 2000.  stathz
  will be 133, and profhz = 400.  With hz = 1000 (default), the lapic timer
  is still at 2000 (as it is now), stathz is at 133 (as it is now), and
  profhz will be 2000 (previously 666).
  MFC after:      2 weeks
  Revision  Changes    Path
  1.46      +17 -10    src/sys/amd64/amd64/local_apic.c
  1.48      +17 -10    src/sys/i386/i386/local_apic.c

More information about the cvs-all mailing list