HZ=1000 in Fedora kernels

Prarit Bhargava prarit at redhat.com
Thu Mar 14 20:46:14 UTC 2013



On 03/14/2013 02:43 PM, Zach Brown wrote:
>> 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. 

IOW .. don't modify HZ=1000 yet ;).  Durnit ...

P.

> 
> Anyway, just a data point.
> 
> - z


More information about the kernel mailing list