From: "Bart Van Assche" <bart.vanassche@gmail.com>
To: "Michael Kerrisk" <mtk.manpages@googlemail.com>
Cc: "Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@elte.hu>,
lkml <linux-kernel@vger.kernel.org>,
"Roman Zippel" <zippel@linux-m68k.org>,
"john stultz" <johnstul@us.ibm.com>
Subject: Re: When did High-Resolution Timers hit mainline?
Date: Wed, 25 Jun 2008 08:32:50 +0200 [thread overview]
Message-ID: <e2e108260806242332i2138f7f7t63626d45a33fdce2@mail.gmail.com> (raw)
In-Reply-To: <cfd18e0f0806242108s79ccc948n73e2ad5f694ecdaf@mail.gmail.com>
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.
next prev parent reply other threads:[~2008-06-25 6:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 6:35 Michael Kerrisk
2008-06-25 4:08 ` Michael Kerrisk
2008-06-25 6:32 ` Bart Van Assche [this message]
2008-06-25 12:16 ` Michael Kerrisk
2008-06-25 13:33 ` Michael Kerrisk
2008-06-25 14:11 ` Michael Kerrisk
2008-06-25 7:09 ` Thomas Gleixner
2008-06-25 12:20 ` Michael Kerrisk
2008-06-25 12:22 ` Thomas Gleixner
2008-06-25 12:25 ` Michael Kerrisk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e2e108260806242332i2138f7f7t63626d45a33fdce2@mail.gmail.com \
--to=bart.vanassche@gmail.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mtk.manpages@googlemail.com \
--cc=tglx@linutronix.de \
--cc=zippel@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®