All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 0/8] Patchset enabling hardware based cross-timestamps for next gen Intel platforms
@ 2016-02-12 20:25 ` Christopher S. Hall
  0 siblings, 0 replies; 42+ messages in thread
From: Christopher S. Hall @ 2016-02-12 20:25 UTC (permalink / raw)
  To: tglx, richardcochran, mingo, john.stultz, hpa, jeffrey.t.kirsher
  Cc: Christopher S. Hall, x86, linux-kernel, intel-wired-lan, netdev,
	kevin.b.stanton, kevin.j.clarke

Modern Intel hardware adds an Always Running Timer (ART) that allows the
network and audio device clocks to precisely cross timestamp the device
clock with the system clock. This allows a precise correlation of the
device time and system time.

This patchset adds interfaces to the timekeeping code allowing drivers
to translate ART time to system time.

Changelog:

Changes from v6 to v7:

*	Reorder several patches
*	Removed correlated clocksource
*	Fixed 32-bit compile issues
*	Added multiplication overflow detection to history computation
*	Added invariant tsc CPU feature - this is related to ART, but
	is a separate feature


Changes from v5 to v6:

*	Pulled supporting code for snapshotting, correlated
	clocksource, and cycles to nanoseconds translation to separate
	patches. Added patches are marked as NEW below. There is,
	however, very little *actually* new code, just reorganized
	code
*	Renamed and moved clocksource change sequence to timekeeper
	struct (out of tk_read_base)
*	Renamed structs for system counter and synced device time
	callback to system_counterval_t and sync_device_time_cb,
	respectively
*	Changed PTP cross-timestamp callback name to getcrosststamp
	for consistency with the timekeeping code - corresponding
	function name changes in e1000e driver
*	Simplified PTP time calculations making use of ktime_to_* code

Changes from v4 to v5:

*	Changes the history mechanism to interpolate system time using
	a single historic system time pair (monotonic raw, realtime)
	rather than implementing a precise history using shadow
	timekeeper (see v4 changes). The advantage of this approach is
	that the history can be arbitrarily long. This approach may
	also be simpler in terms of coding. The major disadvantage is
	that the realtime clock can be adjusted.  When adjusted, the
	realtime clock time (when interpolating from history) is
	always approximate. In general, the longer the interpolation
	period the larger the potential error. There isn't any error
	interpolating the monotonic raw clock time.
*	This patchset also addresses objections to the previous
	patchsets overly complex correlated timestamp structure. This
	patchset splits that structure into several smaller
	structures.  The correlated timestamp interface is renamed
	cross timestamp to avoid any confusion with the correlated
	clocksource.
*	The correlated clocksource is separated from the cross
	timestamp mechanism.
*	Add monotonic raw to the PTP user interface
*	Add e1000e driver configuration option that wraps Intel PCH
	specific code

Changes v3 to v4: 

*	Adds a history mechanism to accomodate slower devices. In this
	case the response time for timestamp reads to the Intel DSP
	are too slow to be accomodated by the original correlated time
	mechanism. The history mechanism turns shadow timekeeper into
	an array where the history is stored.

Christopher S. Hall (8):
  time: Add cycles to nanoseconds translation
  time: Add timekeeping snapshot code capturing system time and counter
  time: Remove duplicated code in ktime_get_raw_and_real()
  time: Add driver cross timestamp interface for higher precision time
    synchronization
  time: Add history to cross timestamp interface supporting slower
    devices
  x86: tsc: Always Running Timer (ART) correlated clocksource
  ptp: Add PTP_SYS_OFFSET_PRECISE for driver crosstimestamping
  net: e1000e: Adds hardware supported cross timestamp on e1000e nic

 Documentation/ptp/testptp.c                 |   6 +-
 arch/x86/include/asm/cpufeature.h           |   3 +-
 arch/x86/include/asm/tsc.h                  |   2 +
 arch/x86/kernel/cpu/scattered.c             |   1 +
 arch/x86/kernel/tsc.c                       |  50 +++++
 drivers/net/ethernet/intel/Kconfig          |   9 +
 drivers/net/ethernet/intel/e1000e/defines.h |   5 +
 drivers/net/ethernet/intel/e1000e/ptp.c     |  85 ++++++++
 drivers/net/ethernet/intel/e1000e/regs.h    |   4 +
 drivers/ptp/ptp_chardev.c                   |  27 +++
 include/linux/pps_kernel.h                  |  17 +-
 include/linux/ptp_clock_kernel.h            |   8 +
 include/linux/timekeeper_internal.h         |   2 +
 include/linux/timekeeping.h                 |  58 ++++++
 include/uapi/linux/ptp_clock.h              |  13 +-
 kernel/time/timekeeping.c                   | 289 +++++++++++++++++++++++++---
 16 files changed, 539 insertions(+), 40 deletions(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2016-02-23  2:49 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-12 20:25 [PATCH v7 0/8] Patchset enabling hardware based cross-timestamps for next gen Intel platforms Christopher S. Hall
2016-02-12 20:25 ` [Intel-wired-lan] " Christopher S. Hall
2016-02-12 20:25 ` [PATCH v7 1/8] time: Add cycles to nanoseconds translation Christopher S. Hall
2016-02-12 20:25   ` [Intel-wired-lan] " Christopher S. Hall
2016-02-12 20:25 ` [PATCH v7 2/8] time: Add timekeeping snapshot code capturing system time and counter Christopher S. Hall
2016-02-12 20:25   ` [Intel-wired-lan] " Christopher S. Hall
2016-02-12 20:25 ` [PATCH v7 3/8] time: Remove duplicated code in ktime_get_raw_and_real() Christopher S. Hall
2016-02-12 20:25   ` [Intel-wired-lan] " Christopher S. Hall
2016-02-16  7:52   ` Richard Cochran
2016-02-16  7:52     ` [Intel-wired-lan] " Richard Cochran
2016-02-16 18:23     ` Christopher Hall
2016-02-16 18:23       ` [Intel-wired-lan] " Christopher Hall
2016-02-12 20:25 ` [PATCH v7 4/8] time: Add driver cross timestamp interface for higher precision time synchronization Christopher S. Hall
2016-02-12 20:25   ` [Intel-wired-lan] " Christopher S. Hall
2016-02-16  7:56   ` Richard Cochran
2016-02-16  7:56     ` [Intel-wired-lan] " Richard Cochran
2016-02-12 20:25 ` [PATCH v7 5/8] time: Add history to cross timestamp interface supporting slower devices Christopher S. Hall
2016-02-12 20:25   ` [Intel-wired-lan] " Christopher S. Hall
2016-02-18 22:17   ` Richard Cochran
2016-02-18 22:17     ` [Intel-wired-lan] " Richard Cochran
2016-02-19 17:33     ` John Stultz
2016-02-19 17:33       ` [Intel-wired-lan] " John Stultz
2016-02-12 20:25 ` [PATCH v7 6/8] x86: tsc: Always Running Timer (ART) correlated clocksource Christopher S. Hall
2016-02-12 20:25   ` [Intel-wired-lan] " Christopher S. Hall
2016-02-18 21:11   ` Andy Lutomirski
2016-02-18 21:11     ` [Intel-wired-lan] " Andy Lutomirski
2016-02-23  2:38     ` Christopher Hall
2016-02-23  2:38       ` [Intel-wired-lan] " Christopher Hall
2016-02-23  2:49       ` Andy Lutomirski
2016-02-23  2:49         ` [Intel-wired-lan] " Andy Lutomirski
2016-02-12 20:25 ` [PATCH v7 7/8] ptp: Add PTP_SYS_OFFSET_PRECISE for driver crosstimestamping Christopher S. Hall
2016-02-12 20:25   ` [Intel-wired-lan] " Christopher S. Hall
2016-02-12 20:25 ` [PATCH v7 8/8] net: e1000e: Adds hardware supported cross timestamp on e1000e nic Christopher S. Hall
2016-02-12 20:25   ` [Intel-wired-lan] " Christopher S. Hall
2016-02-19  0:43   ` Jeff Kirsher
2016-02-19  0:43     ` [Intel-wired-lan] " Jeff Kirsher
2016-02-18 19:26 ` [PATCH v7 0/8] Patchset enabling hardware based cross-timestamps for next gen Intel platforms John Stultz
2016-02-18 19:26   ` [Intel-wired-lan] " John Stultz
2016-02-22 18:33   ` Christopher Hall
2016-02-22 18:33     ` [Intel-wired-lan] " Christopher Hall
2016-02-22 18:49     ` John Stultz
2016-02-22 18:49       ` [Intel-wired-lan] " John Stultz

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.