From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Sangjin Han <sangjin@eecs.berkeley.edu>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] "No probed ethernet devices" caused by inaccurate msec_delay()
Date: Tue, 28 Jan 2014 17:23:22 +0100 [thread overview]
Message-ID: <201401281723.22155.thomas.monjalon@6wind.com> (raw)
In-Reply-To: <CAPG33HQW9onUHh+M7w26hB-0+us2dtY1A3Bj68b-+K1fnEt5KA@mail.gmail.com>
28/01/2014 02:16, Sangjin Han:
> >> It would be nice if I can bypass set_tsc_freq_from_cpuinfo() in
> >> set_tsc_freq().
> >
> > I think it would not solve the problem because your clock is varying and
> > the TSC calibration must be updated accordingly with different values by
> > core.
[...]
> Also, it seems that there is no guarantee that the TSC rate is
> identical to the CPU max clock frequency.
So you may submit a revert of the commit a46154b9c6bc
(timer: get TSC frequency from /proc/cpuinfo)
> I would like to suggest two possible options:
>
> 1. If we can assume that the TSC rate always equals to the max clock
> frequency, then we can use
> /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq instead of
> /proc/cpuinfo (which reflects cpuinfo_cur_freq).
>
> 2. If we can't (AMD?), we can simply get rid of
> set_tsc_freq_from_cpuinfo() and fall back to set_tsc_freq_from_clock()
> or set_tsc_freq_ballback() instead. I always get reasonably good
> accuracy with those two functions -- the only drawback is that it
> takes 0.5 - 1 second for applications to boot up. Not sure if it is a
> big deal or not, though.
Maybe that you can choose between these two methods with a runtime option.
> Besides the TSC frequency, the 4ms * 10 delay in
> ixgbe_reset_pipeline_82599() seems too tight. On my system, it
> succeeds only after 7 (or so) iterations with correct msec_delay().
> The per-iteration delay (4ms; in the kernel ixgbe driver, it is set to
> be 4-8ms) and/or the number of iterations (10) should be increased, I
> suppose.
Feel free to submit a patch.
--
Thomas
next prev parent reply other threads:[~2014-01-28 16:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-27 2:56 Sangjin Han
2014-01-27 9:19 ` Thomas Monjalon
2014-01-28 1:16 ` Sangjin Han
2014-01-28 16:23 ` Thomas Monjalon [this message]
2014-01-28 18:13 ` 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=201401281723.22155.thomas.monjalon@6wind.com \
--to=thomas.monjalon@6wind.com \
--cc=dev@dpdk.org \
--cc=sangjin@eecs.berkeley.edu \
/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).