From: Nish Aravamudan <nish.aravamudan@gmail.com>
To: Chris Friesen <cfriesen@nortel.com>
Cc: quade <quade@hsnr.de>, linux-kernel@vger.kernel.org
Subject: Re: latency error (~2ms) with nanosleep
Date: Mon, 13 Jun 2005 09:54:47 -0700 [thread overview]
Message-ID: <29495f1d05061309543a88f9bb@mail.gmail.com> (raw)
In-Reply-To: <42ADB8D1.9090503@nortel.com>
On 6/13/05, Chris Friesen <cfriesen@nortel.com> wrote:
> quade wrote:
> > Playing around with the (simple) measurement of latency-times
> > I noticed, that the systemcall "nanosleep" has always a minimal
> > latency from about ~2ms (haven't run it all night, so...). It
> > seems to be a systematical error.
>
> Known issue. The x86 interrupt usually has a period of slightly less
> than a ms. It will therefore generally add nearly a whole ms to ensure
> that it does not ever wait for *less* than specified.
Exactly. And the sys_nanosleep() code adds one more if the parameter
has any positive value at all:
expire = timespec_to_jiffies(&t) + (t.tv_sec || t.tv_nsec);
current->state = TASK_INTERRUPTIBLE;
expire = schedule_timeout(expire);
Thanks,
Nish
next prev parent reply other threads:[~2005-06-13 16:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-13 13:30 latency error (~2ms) with nanosleep quade
2005-06-13 14:21 ` Richard B. Johnson
2005-06-13 14:27 ` Eric Piel
2005-06-13 16:48 ` Chris Friesen
2005-06-13 16:54 ` Nish Aravamudan [this message]
2005-06-14 8:57 ` quade
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=29495f1d05061309543a88f9bb@mail.gmail.com \
--to=nish.aravamudan@gmail.com \
--cc=cfriesen@nortel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=quade@hsnr.de \
/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