HZ=1000 in Fedora kernels

Zach Brown zab at redhat.com
Thu Mar 14 18:43:23 UTC 2013


> IIRC, the scheduler timeslice isn't impacted by HZ.

Yeah. As Dave was pointing out, a lot of the timeout aliasing problems
with HZ have been fixed by moving implementations of waits from the HZ
granular interfaces to hrtimers.  f.e.

    commit 8ff3e8e85fa6c312051134b3953e397feb639f51
    Author: Arjan van de Ven <arjan at linux.intel.com>
    Date:   Sun Aug 31 08:26:40 2008 -0700

        select: switch select() and poll() over to hrtimers

has at its core:

-               __timeout = schedule_timeout(__timeout);

+               if (!schedule_hrtimeout(to, HRTIMER_MODE_ABS))

A slightly different and disappointing result of dropping HZ is
increasing the duration of waits in code that is still using
schedule_timeout(1) for a short timeout.

btrfs has a bunch of these that are trying to wait for more work to
accumulate before carrying on.  If you drop HZ you'll be adding 4ms (or
10ms) delays to a few paths.

jbd has similar code that is sensitive to jiffies, but it's a little
more involved because it's measuring journal commit times rather than
using a dumb single jiffie timeout. 

Anyway, just a data point.

- z


More information about the kernel mailing list