From: Jay Rolette <rolette@infiniteio.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: DPDK <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] rte_alarm: modify it to make it not to be affected by discontinuous jumps in the system time
Date: Wed, 14 Oct 2015 07:09:31 -0500 [thread overview]
Message-ID: <CADNuJVr+=YQyjLHnVS7jVTcdrQ+OWwb=FCVS7qGPQiP79tZHDQ@mail.gmail.com> (raw)
In-Reply-To: <20151013173320.46e07232@xeon-e3>
Back when this was first submitted in June, I mentioned that
CLOCK_MONOTONIC_RAW was ~10x slower than CLOCK_MONOTONIC:
http://dpdk.org/ml/archives/dev/2015-June/018687.html
It's not completely free from NTP frequency adjustments, but it won't have
any discontinuities.
That's what we've been using in our tree since then...
Jay
On Tue, Oct 13, 2015 at 7:33 PM, Stephen Hemminger <
stephen@networkplumber.org> wrote:
> On Fri, 5 Jun 2015 10:46:36 +0800
> Wen-Chi Yang <wolkayang@gmail.com> wrote:
>
> > Due to eal_alarm_callback() and rte_eal_alarm_set() use gettimeofday()
> > to get the current time, and gettimeofday() is affected by jumps.
> >
> > For example, set up a rte_alarm which will be triggerd next second (
> > current time + 1 second) by rte_eal_alarm_set(). And the callback
> > function of this rte_alarm sets up another rte_alarm which will be
> > triggered next second (current time + 2 second).
> > Once we change the system time when the callback function is triggered,
> > it is possiblb that rte alarm functionalities work out of expectation.
> >
> > Replace gettimeofday() with clock_gettime(CLOCK_MONOTONIC_RAW, &now)
> > could avoid this phenomenon.
> >
> > Signed-off-by: Wen-Chi Yang <wolkayang@gmail.com>
>
> Agreed, this should be applied.
> Does BSD version have same problem?
>
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
>
>
next prev parent reply other threads:[~2015-10-14 12:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-05 2:46 Wen-Chi Yang
2015-10-14 0:33 ` Stephen Hemminger
2015-10-14 12:09 ` Jay Rolette [this message]
2015-10-21 15:00 ` Thomas Monjalon
2015-10-21 14:57 ` Thomas Monjalon
2015-10-21 15:10 ` Thomas Monjalon
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='CADNuJVr+=YQyjLHnVS7jVTcdrQ+OWwb=FCVS7qGPQiP79tZHDQ@mail.gmail.com' \
--to=rolette@infiniteio.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.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).