[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: When did High-Resolution Timers hit mainline?
From:       "Bart Van Assche" <bart.vanassche () gmail ! com>
Date:       2008-06-25 6:32:50
Message-ID: e2e108260806242332i2138f7f7t63626d45a33fdce2 () mail ! gmail ! com
[Download RAW message or body]

On Wed, Jun 25, 2008 at 6:08 AM, Michael Kerrisk
<mtk.manpages@googlemail.com> wrote:
>   The Software Clock, HZ, and Jiffies
>       The accuracy of various system calls that set timeouts,  (e.g.,
>       select(2),   sigtimedwait(2))   and  measure  CPU  time  (e.g.,
>       getrusage(2)) is limited by  the  resolution  of  the  software
>       clock,  a clock maintained by the kernel which measures time in
>       jiffies.  The size of a jiffy is determined by the value of the
>       kernel constant HZ.

Maybe "size of a jiffy" should be replaced by "duration of a jiffy" ?

An explanation of the impact of CONFIG_NO_HZ is missing.

You also missed the fact that since the 2.6 kernel there are two
constants related to time resolution, namely HZ and USER_HZ. HZ is the
frequency of the timer interrupt, and 1/USER_HZ is the time resolution
for system calls that use jiffies as time unit (e.g. the five values
returned by the times() system call). The time resolution of e.g. the
select() and poll() system calls is 1.0/HZ since the timeout for these
system calls is specified as a struct timeval or struct timespec.

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic