All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Christopher Hall <christopher.s.hall@intel.com>
Cc: John Stultz <john.stultz@linaro.org>,
	Richard Cochran <richardcochran@gmail.com>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
	"x86@kernel.org" <x86@kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	"Stanton, Kevin B" <kevin.b.stanton@intel.com>
Subject: Re: [RFC v5 3/6] Add history to cross timestamp interface supporting slower devices
Date: Fri, 8 Jan 2016 15:04:28 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.11.1601081503210.3575@nanos> (raw)
In-Reply-To: <op.yawaqe0i1774gr@chall-mobl2.amr.corp.intel.com>

On Thu, 7 Jan 2016, Christopher Hall wrote:
> On Wed, 06 Jan 2016 11:37:23 -0800, John Stultz <john.stultz@linaro.org>
> wrote:
> > I've not done a super close reading here. But is it very likely the
> > the history_ref->cs_seq is the same as the captured seq? I thought
> > this history_ref was to allow old cross stamps to be used to improve
> > the back-calculation of the time at the given cycle value. So throwing
> > them out if they are older then the last tick seems strange.
> 
> Maybe this needs more explanation. The clocksource sequence (cs_seq) is
> incremented for each change in clocksource. I use this to detect a rare corner
> case where the clocksource is changed from (on x86 anyway) TSC and then back.
> If the history crosses one of these changes then interpolation shouldn't be
> attempted (return error). It's not really enough when using the history to
> just check that the current clocksource is equal to the one used at the start
> of the history. The clocksource must not have changed at all. To answer your
> question, it's not at all likely that this would occur.

You can flush the history when a clocksource change happens. No need to add
extra data to the core structures.

Thanks,

	tglx

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Gleixner <tglx@linutronix.de>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [RFC v5 3/6] Add history to cross timestamp interface supporting slower devices
Date: Fri, 8 Jan 2016 15:04:28 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.11.1601081503210.3575@nanos> (raw)
In-Reply-To: <op.yawaqe0i1774gr@chall-mobl2.amr.corp.intel.com>

On Thu, 7 Jan 2016, Christopher Hall wrote:
> On Wed, 06 Jan 2016 11:37:23 -0800, John Stultz <john.stultz@linaro.org>
> wrote:
> > I've not done a super close reading here. But is it very likely the
> > the history_ref->cs_seq is the same as the captured seq? I thought
> > this history_ref was to allow old cross stamps to be used to improve
> > the back-calculation of the time at the given cycle value. So throwing
> > them out if they are older then the last tick seems strange.
> 
> Maybe this needs more explanation. The clocksource sequence (cs_seq) is
> incremented for each change in clocksource. I use this to detect a rare corner
> case where the clocksource is changed from (on x86 anyway) TSC and then back.
> If the history crosses one of these changes then interpolation shouldn't be
> attempted (return error). It's not really enough when using the history to
> just check that the current clocksource is equal to the one used at the start
> of the history. The clocksource must not have changed at all. To answer your
> question, it's not at all likely that this would occur.

You can flush the history when a clocksource change happens. No need to add
extra data to the core structures.

Thanks,

	tglx

  parent reply	other threads:[~2016-01-08 14:06 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-04 12:45 [RFC v5 0/6] Patchset enabling hardware based cross-timestamps for next gen Intel platforms Christopher S. Hall
2016-01-04 12:45 ` [Intel-wired-lan] " Christopher S. Hall
2016-01-04 12:45 ` [RFC v5 1/6] Timekeeping cross timestamp interface for device drivers Christopher S. Hall
2016-01-04 12:45   ` [Intel-wired-lan] " Christopher S. Hall
2016-01-06 18:55   ` John Stultz
2016-01-06 18:55     ` [Intel-wired-lan] " John Stultz
2016-01-08  0:42     ` Christopher Hall
2016-01-08  0:42       ` [Intel-wired-lan] " Christopher Hall
2016-01-08  1:05       ` John Stultz
2016-01-08  1:05         ` [Intel-wired-lan] " John Stultz
2016-01-08  9:13         ` Richard Cochran
2016-01-08  9:13           ` [Intel-wired-lan] " Richard Cochran
2016-01-04 12:45 ` [RFC v5 2/6] Always Running Timer (ART) correlated clocksource Christopher S. Hall
2016-01-04 12:45   ` [Intel-wired-lan] " Christopher S. Hall
2016-01-04 12:45 ` [RFC v5 3/6] Add history to cross timestamp interface supporting slower devices Christopher S. Hall
2016-01-04 12:45   ` [Intel-wired-lan] " Christopher S. Hall
2016-01-06 19:37   ` John Stultz
2016-01-06 19:37     ` [Intel-wired-lan] " John Stultz
2016-01-08  1:07     ` Christopher Hall
2016-01-08  1:07       ` [Intel-wired-lan] " Christopher Hall
2016-01-08  1:12       ` John Stultz
2016-01-08  1:12         ` [Intel-wired-lan] " John Stultz
2016-01-08 14:04       ` Thomas Gleixner [this message]
2016-01-08 14:04         ` Thomas Gleixner
2016-01-08 22:28         ` Christopher Hall
2016-01-08 22:28           ` [Intel-wired-lan] " Christopher Hall
2016-01-04 12:45 ` [RFC v5 4/6] Remove duplicate code from ktime_get_raw_and_real code Christopher S. Hall
2016-01-04 12:45   ` [Intel-wired-lan] " Christopher S. Hall
2016-01-06 19:42   ` John Stultz
2016-01-06 19:42     ` [Intel-wired-lan] " John Stultz
2016-01-04 12:45 ` [RFC v5 5/6] Add PTP_SYS_OFFSET_PRECISE for driver crosstimestamping Christopher S. Hall
2016-01-04 12:45   ` [Intel-wired-lan] " Christopher S. Hall
2016-01-05 15:27   ` Richard Cochran
2016-01-05 15:27     ` [Intel-wired-lan] " Richard Cochran
2016-01-07  1:42     ` Christopher Hall
2016-01-07  1:42       ` [Intel-wired-lan] " Christopher Hall
2016-01-04 12:45 ` [RFC v5 6/6] Adds hardware supported cross timestamp Christopher S. Hall
2016-01-04 12:45   ` [Intel-wired-lan] " Christopher S. Hall

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=alpine.DEB.2.11.1601081503210.3575@nanos \
    --to=tglx@linutronix.de \
    --cc=christopher.s.hall@intel.com \
    --cc=hpa@zytor.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=john.stultz@linaro.org \
    --cc=kevin.b.stanton@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.