Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Feb 6, 2008
  1. @dfries

    system timer: fix crash in <100Hz system timer

    dfries authored Linus Torvalds committed
    The kernel has a divide by zero crash when trying to run the system timer
    less than 100Hz.  The problem is x/(HZ/USER_HZ) and related.  Now
    x*(USER_HZ/HZ) will be used if HZ<USER_HZ.
    I'm running the Linux kernel under qemu and went to run a slower system
    timer to take less CPU (and battery) on the host.  I found that the kernel
    paniced under emulation because of a divide by zero in three places.  Here
    is the patch.  The base git was updated today 01-05-2008.  I went for a
    20Hz system time by adding config HZ_20 etc to kernel/Kconfig.hz.  With
    this patch I verified the system timer by looking at /proc/interrupts.
    [ partially clean up the macro maze]
    Signed-off-by: David Fries <>
    Cc: "H. Peter Anvin" <>
    Cc: Ingo Molnar <>
    Cc: Thomas Gleixner <>
    Signed-off-by: Andrew Morton <>
    Signed-off-by: Linus Torvalds <>
Something went wrong with that request. Please try again.