From: Jae-Young Kim <jaykim@cs.purdue.edu>
To: Andy Whitcroft <apw@shadowen.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: kernel timer accuracy
Date: Wed, 30 Apr 2003 01:01:35 -0500 [thread overview]
Message-ID: <20030430060135.GA13292@punch.cs.purdue.edu> (raw)
In-Reply-To: <33201371.1051641831@blackhawk>
On Tue, Apr 29, 2003 at 06:43:51PM +0100, Andy Whitcroft wrote:
> My expectation of the error would be 'random' but it would depend on two
> things. Firstly, the accuracy of the clock used to measure the time and
> secondly, the actual source of the packets, ie. the absolute accuracy of
> the packet injection. We may be seeing the difference between the two
> clocks on the two machines in this combination.
First of all, thank you for everybody providing me valuable information.
The above was right speculation on my timer problem. I got to know
what was wrong by checking the accuracy of the packet injection.
In my experiment, I sent a packet per second from a remote machine.
However, since the clock pacing of two different machines (the remote
packet-sending machine and the local machine) is different,
the packet injection at the local machine was not accurately
one-packet-per-second rate. Instead, in my previous experiment,
the remote machine's clock was slightly slower than the local machine's clock.
(The pacing difference is 10msec/600seconds.)
When my delay module set up a 5-ticks timer, the actual sleep time was
4 full tick time + 1 partial tick at the time of timer-setup. If a packet
arrives at the very beginning of the first tick, this packet will be
delayed for 5 full ticks (= nearly 50msec). However if a packet arrives
at the very end of the first tick, this packet will only be delayed
for about 4 full ticks. (= nearly 40msec). When time drift crosses the
boundary of 1 tick (in my experiment, after 600 seconds), it will become
the same as the former case and the same procedure is repeated.
During 600 seconds, the clock pacing difference has gradully created the time
drift of packet injection and thus induced the odd delay trend.
This was confirmed when I changed the sending machines. If the remote machine's
clock is faster than the local machine. The drift direction is backward.
If two machines' clocks are nearly synchronized, I couldn't see the
delay drift at all.
- Jay
prev parent reply other threads:[~2003-04-30 5:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-29 16:54 kernel timer accuracy Jae-Young Kim
2003-04-29 19:11 ` rmoser
2003-04-29 19:47 ` mbs
2003-04-29 20:10 ` george anzinger
[not found] ` <33201371.1051641831@blackhawk>
2003-04-30 6:01 ` Jae-Young Kim [this message]
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=20030430060135.GA13292@punch.cs.purdue.edu \
--to=jaykim@cs.purdue.edu \
--cc=apw@shadowen.org \
--cc=linux-kernel@vger.kernel.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