From: Patrick McHardy <kaber@trash.net>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: netdev@oss.sgi.com
Subject: Re: Inaccuracies with SCH_CLK_CPU
Date: Wed, 04 Aug 2004 22:10:43 +0200 [thread overview]
Message-ID: <411142C3.7070501@trash.net> (raw)
In-Reply-To: <20040804094310.1d054b3a@dell_ss3.pdx.osdl.net>
Stephen Hemminger wrote:
>I noticed that the netem delay values are off if using
>CONFIG_NET_SCH_CKL_CPU. For example, if the latency is set to 500ms
> a ping reports the time as much less (343ms).
>
>Requested JIFFIES GETTIMEODAY CPU
>0 .1 .1 .1
>1 2 2 1
>5 5 6 4
>10 10 11 7
>100 98 101 69
>500 489 500 343
>1000 976 1000 685
>
>The 1ms value is affected by the clock granularity. Larger jiffie values
>are inaccurate due to the optimization of using shift to do divide (ie 1024 > 1000).
>
I need to look at this some more.
>
>With CLK_CPU /proc/net/psched is:
>000005d9 00000400 000f4240 000003e8
>
>
>Instead of computing own values of psched_us_per_tick
>and psched_clock_per_hz, couldn't the values already done
>in timers code be used?
>
Can we do this in a uniform way on all architectures supported by
NET_SCH_CLK_CPU ? I think it's easier to fix up the PSCHED_* macros.
>
>Also doesn't PSCHED_US2JIFFIE need to be doing a do_div()
>in order to correctly do u64 divided by u32. Otherwise
>it ends up just doing an u32 divide.
>
No, PSCHED_US2JIFFIE is intended to be used with psched_tdiff_t, using
psched_time_t doesn't work with NET_SCH_CLK_GETTIMEOFDAY. psched_tdiff_t
is 32-bit on all 32-bit architectures.
Regards
Patrick
next prev parent reply other threads:[~2004-08-04 20:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-04 16:43 Inaccuracies with SCH_CLK_CPU Stephen Hemminger
2004-08-04 20:10 ` Patrick McHardy [this message]
2004-08-07 18:44 ` Patrick McHardy
2004-08-07 18:54 ` jamal
2004-08-09 17:11 ` Stephen Hemminger
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=411142C3.7070501@trash.net \
--to=kaber@trash.net \
--cc=netdev@oss.sgi.com \
--cc=shemminger@osdl.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;
as well as URLs for NNTP newsgroup(s).