* Re: [patch 22/24] timekeeping: Remove system_device_crosststamp::sys_realtime
From: Thomas Weißschuh @ 2026-05-27 7:24 UTC (permalink / raw)
To: Thomas Gleixner
Cc: LKML, David Woodhouse, Miroslav Lichvar, John Stultz,
Stephen Boyd, Anna-Maria Behnsen, Frederic Weisbecker,
Arthur Kiyanovski, Rodolfo Giometti, Vincent Donnefort,
Marc Zyngier, Oliver Upton, kvmarm, Oliver Upton, Richard Cochran,
netdev, Takashi Iwai, Miri Korenblit, Johannes Berg, Jacob Keller,
Tony Nguyen, Saeed Mahameed, Peter Hilber, Michael S. Tsirkin,
virtualization, linux-wireless, linux-sound
In-Reply-To: <20260526171224.347997043@kernel.org>
On Tue, May 26, 2026 at 07:15:17PM +0200, Thomas Gleixner wrote:
> All users are converted to sys_systime.
>
> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
^ permalink raw reply
* Re: [patch 18/24] timekeeping: Prepare for cross timestamps on arbitrary clock IDs
From: Thomas Weißschuh @ 2026-05-27 7:23 UTC (permalink / raw)
To: Thomas Gleixner
Cc: LKML, David Woodhouse, Miroslav Lichvar, John Stultz,
Stephen Boyd, Anna-Maria Behnsen, Frederic Weisbecker,
Arthur Kiyanovski, Rodolfo Giometti, Vincent Donnefort,
Marc Zyngier, Oliver Upton, kvmarm, Oliver Upton, Richard Cochran,
netdev, Takashi Iwai, Miri Korenblit, Johannes Berg, Jacob Keller,
Tony Nguyen, Saeed Mahameed, Peter Hilber, Michael S. Tsirkin,
virtualization, linux-wireless, linux-sound
In-Reply-To: <20260526171224.050496338@kernel.org>
On Tue, May 26, 2026 at 07:14:57PM +0200, Thomas Gleixner wrote:
> PTP device system crosstime stamps support only CLOCK_REALTIME, which is
> meaningless for AUX clocks. The PTP core hands in the clock ID already, so
> prepare the core code to honor it.
>
> - Add a new sys_systime field to struct system_device_crosststamp which
> aliases the sys_realtime field. Once all users are converted
> sys_realtime can be removed.
>
> - Prepare get_device_system_crosststamp() and the related code for it by
> switching to sys_systime and providing the initial changes to utilize
> different time keepers.
>
> No functional change intended.
>
> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
^ permalink raw reply
* Re: [patch 17/24] timekeeping: Remove ktime_get_snapshot()
From: Thomas Weißschuh @ 2026-05-27 7:20 UTC (permalink / raw)
To: Thomas Gleixner
Cc: LKML, David Woodhouse, Miroslav Lichvar, John Stultz,
Stephen Boyd, Anna-Maria Behnsen, Frederic Weisbecker,
Arthur Kiyanovski, Rodolfo Giometti, Vincent Donnefort,
Marc Zyngier, Oliver Upton, kvmarm, Oliver Upton, Richard Cochran,
netdev, Takashi Iwai, Miri Korenblit, Johannes Berg, Jacob Keller,
Tony Nguyen, Saeed Mahameed, Peter Hilber, Michael S. Tsirkin,
virtualization, linux-wireless, linux-sound
In-Reply-To: <20260526171223.974925389@kernel.org>
On Tue, May 26, 2026 at 07:14:52PM +0200, Thomas Gleixner wrote:
> All users have been converted to ktime_get_snapshot_id().
>
> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
^ permalink raw reply
* Re: [patch 09/24] timekeeping: Add CLOCK_AUX support for ktime_get_snapshot_id()
From: Thomas Weißschuh @ 2026-05-27 7:18 UTC (permalink / raw)
To: Thomas Gleixner
Cc: LKML, David Woodhouse, Miroslav Lichvar, John Stultz,
Stephen Boyd, Anna-Maria Behnsen, Frederic Weisbecker,
Arthur Kiyanovski, Rodolfo Giometti, Vincent Donnefort,
Marc Zyngier, Oliver Upton, kvmarm, Oliver Upton, Richard Cochran,
netdev, Takashi Iwai, Miri Korenblit, Johannes Berg, Jacob Keller,
Tony Nguyen, Saeed Mahameed, Peter Hilber, Michael S. Tsirkin,
virtualization, linux-wireless, linux-sound
In-Reply-To: <20260526171223.374814973@kernel.org>
On Tue, May 26, 2026 at 07:14:13PM +0200, Thomas Gleixner wrote:
> Now that all users are converted it's possible to enable snapshotting of
> CLOCK_AUX time. The underlying clocksource is the same as for all other
> CLOCK variants.
>
> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
^ permalink raw reply
* Re: [patch 08/24] timekeeping: Remove system_time_snapshot::real/boot
From: Thomas Weißschuh @ 2026-05-27 7:17 UTC (permalink / raw)
To: Thomas Gleixner
Cc: LKML, David Woodhouse, Miroslav Lichvar, John Stultz,
Stephen Boyd, Anna-Maria Behnsen, Frederic Weisbecker,
Arthur Kiyanovski, Rodolfo Giometti, Vincent Donnefort,
Marc Zyngier, Oliver Upton, kvmarm, Oliver Upton, Richard Cochran,
netdev, Takashi Iwai, Miri Korenblit, Johannes Berg, Jacob Keller,
Tony Nguyen, Saeed Mahameed, Peter Hilber, Michael S. Tsirkin,
virtualization, linux-wireless, linux-sound
In-Reply-To: <20260526171223.300914258@kernel.org>
On Tue, May 26, 2026 at 07:14:08PM +0200, Thomas Gleixner wrote:
> All users are converted over to ktime_get_snapshot_id() and
> system_time_snapshot::sys.
>
> Remove the leftovers.
>
> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
> include/linux/timekeeping.h | 4 ----
> kernel/time/timekeeping.c | 8 --------
> 2 files changed, 12 deletions(-)
>
> --- a/include/linux/timekeeping.h
> +++ b/include/linux/timekeeping.h
> @@ -280,8 +280,6 @@ static inline bool ktime_get_aux_ts64(cl
> * a selected CLOCK_* and the clocksource counter value
> * @cycles: Clocksource counter value to produce the system times
> * @sys: The system time of the selected CLOCK ID
> - * @real: Realtime system time
> - * @boot: Boot time
> * @raw: Monotonic raw system time
> * @cs_id: Clocksource ID
> * @clock_was_set_seq: The sequence number of clock-was-set events
> @@ -291,8 +289,6 @@ static inline bool ktime_get_aux_ts64(cl
> struct system_time_snapshot {
> u64 cycles;
> ktime_t sys;
> - ktime_t real;
> - ktime_t boot;
> ktime_t raw;
> enum clocksource_ids cs_id;
> unsigned int clock_was_set_seq;
> --- a/kernel/time/timekeeping.c
> +++ b/kernel/time/timekeeping.c
> @@ -1196,8 +1196,6 @@ bool ktime_get_snapshot_id(struct system
> struct timekeeper *tk;
> struct tk_data *tkd;
> unsigned int seq;
> - ktime_t base_real;
> - ktime_t base_boot;
>
> /* Invalidate the snapshot for all failure cases */
> systime_snapshot->valid = false;
> @@ -1239,18 +1237,12 @@ bool ktime_get_snapshot_id(struct system
> offs_sys = *offs;
> base_raw = tk->tkr_raw.base;
>
> - /* Kept around until the callers are fixed up */
> - base_real = ktime_add(base_sys, tk_core.timekeeper.offs_real);
> - base_boot = ktime_add(base_sys, tk_core.timekeeper.offs_boot);
> -
In patch 1 I was confused slightly why only these two lines use tk_core,
while everything else uses tk->, even base_sys.
Functionally it doesn't make a difference, but for clarity this could be more
consistent.
> nsec_sys = timekeeping_cycles_to_ns(&tk->tkr_mono, now);
> nsec_raw = timekeeping_cycles_to_ns(&tk->tkr_raw, now);
> } while (read_seqcount_retry(&tkd->seq, seq));
>
> systime_snapshot->cycles = now;
> systime_snapshot->sys = ktime_add_ns(base_sys, offs_sys + nsec_sys);
> - systime_snapshot->real = ktime_add_ns(base_real, nsec_sys);
> - systime_snapshot->boot = ktime_add_ns(base_boot, nsec_sys);
> systime_snapshot->raw = ktime_add_ns(base_raw, nsec_raw);
>
> /*
>
^ permalink raw reply
* Re: [patch 07/24] ptp: ptp_vmclock: Convert to ktime_get_snapshot_id()
From: Thomas Weißschuh @ 2026-05-27 7:10 UTC (permalink / raw)
To: Thomas Gleixner
Cc: LKML, David Woodhouse, Miroslav Lichvar, John Stultz,
Stephen Boyd, Anna-Maria Behnsen, Frederic Weisbecker,
Arthur Kiyanovski, Richard Cochran, netdev, Rodolfo Giometti,
Vincent Donnefort, Marc Zyngier, Oliver Upton, kvmarm,
Oliver Upton, Takashi Iwai, Miri Korenblit, Johannes Berg,
Jacob Keller, Tony Nguyen, Saeed Mahameed, Peter Hilber,
Michael S. Tsirkin, virtualization, linux-wireless, linux-sound
In-Reply-To: <20260526171223.223860692@kernel.org>
On Tue, May 26, 2026 at 07:14:03PM +0200, Thomas Gleixner wrote:
> ktime_get_snapshot() is replaced by ktime_get_snapshot_id() which allows to
> request a particular CLOCK ID to be captured along with the clocksource
> counter.
>
> Convert vmclock over and use the new system_time_snapshot::sys field, which
> holds the system timestamp selected by the CLOCK ID argument.
>
> No functional change intended.
>
> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
> Cc: Richard Cochran <richardcochran@gmail.com>
> Cc: netdev@vger.kernel.org
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
^ permalink raw reply
* Re: [patch 06/24] KVM: arm64: Use ktime_get_snapshot_id() to snapshot CLOCK_REALTIME
From: Thomas Weißschuh @ 2026-05-27 7:03 UTC (permalink / raw)
To: Thomas Gleixner
Cc: LKML, David Woodhouse, Miroslav Lichvar, John Stultz,
Stephen Boyd, Anna-Maria Behnsen, Frederic Weisbecker,
Arthur Kiyanovski, Marc Zyngier, Oliver Upton, kvmarm,
Rodolfo Giometti, Vincent Donnefort, Oliver Upton,
Richard Cochran, netdev, Takashi Iwai, Miri Korenblit,
Johannes Berg, Jacob Keller, Tony Nguyen, Saeed Mahameed,
Peter Hilber, Michael S. Tsirkin, virtualization, linux-wireless,
linux-sound
In-Reply-To: <20260526171223.144327185@kernel.org>
On Tue, May 26, 2026 at 07:13:58PM +0200, Thomas Gleixner wrote:
> ktime_get_snapshot() is replaced by ktime_get_snapshot_id() which allows to
> request a particular CLOCK ID to be captured along with the clocksource
> counter.
>
> Convert the usage in kvm_get_ptp_time() over and use the new
> system_time_snapshot::sys field, which holds the system timestamp selected
> by the CLOCK ID argument.
>
> No functional change intended.
>
> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Oliver Upton <oupton@kernel.org>
> Cc: kvmarm@lists.linux.dev
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
^ permalink raw reply
* Re: [patch 05/24] KVM: arm64: Use ktime_get_snapshot_id() to retrieve CLOCK_BOOTTIME
From: Thomas Weißschuh @ 2026-05-27 7:02 UTC (permalink / raw)
To: Thomas Gleixner
Cc: LKML, David Woodhouse, Miroslav Lichvar, John Stultz,
Stephen Boyd, Anna-Maria Behnsen, Frederic Weisbecker,
Arthur Kiyanovski, Vincent Donnefort, Marc Zyngier, Oliver Upton,
kvmarm, Rodolfo Giometti, Oliver Upton, Richard Cochran, netdev,
Takashi Iwai, Miri Korenblit, Johannes Berg, Jacob Keller,
Tony Nguyen, Saeed Mahameed, Peter Hilber, Michael S. Tsirkin,
virtualization, linux-wireless, linux-sound
In-Reply-To: <20260526171223.070087856@kernel.org>
On Tue, May 26, 2026 at 07:13:53PM +0200, Thomas Gleixner wrote:
> ktime_get_snapshot() is replaced by ktime_get_snapshot_id() which allows to
> request a particular CLOCK ID to be captured along with the clocksource
> counter.
>
> Convert the tracing mechanism over and use the new
> system_time_snapshot::sys field, which holds the system timestamp selected
> by the CLOCK ID argument.
>
> No functional change intended.
>
> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
> Cc: Vincent Donnefort <vdonnefort@google.com>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Oliver Upton <oliver.upton@linux.dev>
> Cc: kvmarm@lists.linux.dev
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
^ permalink raw reply
* Re: [patch 04/24] pps: Convert to ktime_get_snapshot_id()
From: Thomas Weißschuh @ 2026-05-27 7:02 UTC (permalink / raw)
To: Thomas Gleixner
Cc: LKML, David Woodhouse, Miroslav Lichvar, John Stultz,
Stephen Boyd, Anna-Maria Behnsen, Frederic Weisbecker,
Arthur Kiyanovski, Rodolfo Giometti, Vincent Donnefort,
Marc Zyngier, Oliver Upton, kvmarm, Oliver Upton, Richard Cochran,
netdev, Takashi Iwai, Miri Korenblit, Johannes Berg, Jacob Keller,
Tony Nguyen, Saeed Mahameed, Peter Hilber, Michael S. Tsirkin,
virtualization, linux-wireless, linux-sound
In-Reply-To: <20260526171222.995833811@kernel.org>
On Tue, May 26, 2026 at 07:13:48PM +0200, Thomas Gleixner wrote:
> ktime_get_snapshot() resolves to ktime_get_snapshot_id(CLOCK_REALTIME).
>
> Make it obvious in the code and convert the readout to use the
> snapshot::sys field instead of snapshot::real, which is going away.
>
> Similar to the PPS generators, avoid the more expensive snapshot when
> CONFIG_NTP_PPS is disabled.
>
> No functional change intended.
>
> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
> Cc: Rodolfo Giometti <giometti@enneenne.com>
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
> include/linux/pps_kernel.h | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> --- a/include/linux/pps_kernel.h
> +++ b/include/linux/pps_kernel.h
> @@ -99,12 +99,14 @@ static inline void timespec_to_pps_ktime
>
> static inline void pps_get_ts(struct pps_event_time *ts)
> {
> +#ifdef CONFIG_NTP_PPS
IS_ENABLED()?
> struct system_time_snapshot snap;
>
> - ktime_get_snapshot(&snap);
> - ts->ts_real = ktime_to_timespec64(snap.real);
> -#ifdef CONFIG_NTP_PPS
> + ktime_get_snapshot_id(&snap, CLOCK_REALTIME);
> + ts->ts_real = ktime_to_timespec64(snap.sys);
> ts->ts_raw = ktime_to_timespec64(snap.raw);
> +#else
> + ktime_get_real_ts64(&ts->ts_real);
> #endif
> }
>
>
^ permalink raw reply
* Re: [patch 03/24] pps: generators: Use ktime_get_real_ts64() instead of ktime_get_snapshot()
From: Thomas Weißschuh @ 2026-05-27 7:00 UTC (permalink / raw)
To: Thomas Gleixner
Cc: LKML, David Woodhouse, Miroslav Lichvar, John Stultz,
Stephen Boyd, Anna-Maria Behnsen, Frederic Weisbecker,
Arthur Kiyanovski, Rodolfo Giometti, Vincent Donnefort,
Marc Zyngier, Oliver Upton, kvmarm, Oliver Upton, Richard Cochran,
netdev, Takashi Iwai, Miri Korenblit, Johannes Berg, Jacob Keller,
Tony Nguyen, Saeed Mahameed, Peter Hilber, Michael S. Tsirkin,
virtualization, linux-wireless, linux-sound
In-Reply-To: <20260526171222.920736414@kernel.org>
On Tue, May 26, 2026 at 07:13:43PM +0200, Thomas Gleixner wrote:
> There is no reason to use the more complex ktime_get_snapshot() for
> retrieving CLOCK_REALTIME.
>
> Just use ktime_get_real_ts64(), which avoids the extra timespec64
> conversion as a bonus.
>
> No functional change intended.
>
> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
> Cc: Rodolfo Giometti <giometti@enneenne.com>
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
These preparation commits could also go to the front of the series.
^ permalink raw reply
* Re: [patch 02/24] timekeeping: Use system_time_snapshot::sys instead of ::real
From: Thomas Weißschuh @ 2026-05-27 6:58 UTC (permalink / raw)
To: Thomas Gleixner
Cc: LKML, David Woodhouse, Miroslav Lichvar, John Stultz,
Stephen Boyd, Anna-Maria Behnsen, Frederic Weisbecker,
Arthur Kiyanovski, Rodolfo Giometti, Vincent Donnefort,
Marc Zyngier, Oliver Upton, kvmarm, Oliver Upton, Richard Cochran,
netdev, Takashi Iwai, Miri Korenblit, Johannes Berg, Jacob Keller,
Tony Nguyen, Saeed Mahameed, Peter Hilber, Michael S. Tsirkin,
virtualization, linux-wireless, linux-sound
In-Reply-To: <20260526171222.846848261@kernel.org>
On Tue, May 26, 2026 at 07:13:38PM +0200, Thomas Gleixner wrote:
> system_time_snapshot::sys provides the same information as
> system_time_snapshot::real when the snapshot was taken with
> ktime_get_snapshot_id(CLOCK_REALTIME).
>
> Convert the history interpolation over to use 'sys' as 'real' is going away
> once all users are converted.
>
> As a side effect this is the first step to support CLOCK_AUX with
> get_device_crosstime_stamp() and the history interpolation.
>
> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
^ permalink raw reply
* Re: [patch 01/24] timekeeping: Provide ktime_get_snapshot_id()
From: Thomas Weißschuh @ 2026-05-27 6:56 UTC (permalink / raw)
To: Thomas Gleixner
Cc: LKML, David Woodhouse, Miroslav Lichvar, John Stultz,
Stephen Boyd, Anna-Maria Behnsen, Frederic Weisbecker,
Arthur Kiyanovski, Rodolfo Giometti, Vincent Donnefort,
Marc Zyngier, Oliver Upton, kvmarm, Oliver Upton, Richard Cochran,
netdev, Takashi Iwai, Miri Korenblit, Johannes Berg, Jacob Keller,
Tony Nguyen, Saeed Mahameed, Peter Hilber, Michael S. Tsirkin,
virtualization, linux-wireless, linux-sound
In-Reply-To: <20260526171222.769770418@kernel.org>
On Tue, May 26, 2026 at 07:13:33PM +0200, Thomas Gleixner wrote:
> ktime_get_snapshot() provides a snapshot of the underlying clocksource
> counter value and the corresponding CLOCK_MONOTONIC_RAW, CLOCK_REALTIME and
> CLOCK_BOOTTIME timestamps.
>
> There is no usage of CLOCK_REALTIME and CLOCK_BOOTTIME at the same time and
> CLOCK_BOOTTIME support was just added for the ARM64 KVM tracing mechanism,
> which needs CLOCK_BOOTTIME and the underlying clocksource counter value.
>
> ktime_get_snapshot() is also not suitable for usage with CLOCK_AUX, but
> that's a prerequisite to support PTP hardware timestamping for CLOCK_AUX
> steering.
>
> As a first step, rename ktime_get_snapshot() to ktime_get_snapshot_id(),
> which now takes a clockid argument to select the clock which needs to be
> captured. The result is stored in system_time_snapshot::sys, which will
> replace the system_time_snapshot::real/boot members once all usage sites
> have been converted.
>
> ktime_get_snapshot() is a simple wrapper which hands in CLOCK_REALTIME as
> clockid argument for the conversion period. That means CLOCK_REALTIME is
> now captured twice, but that redunancy is only temporary.
>
> No functional change vs. current users of ktime_get_snapshot()
>
> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Plus some subjective nitpicks below.
> ---
> include/linux/timekeeping.h | 29 ++++++++++-----
> kernel/time/timekeeping.c | 84 +++++++++++++++++++++++++++++++++-----------
> 2 files changed, 84 insertions(+), 29 deletions(-)
>
> --- a/include/linux/timekeeping.h
> +++ b/include/linux/timekeeping.h
> @@ -276,24 +276,28 @@ static inline bool ktime_get_aux_ts64(cl
> #endif
>
> /**
> - * struct system_time_snapshot - simultaneous raw/real time capture with
> - * counter value
> - * @cycles: Clocksource counter value to produce the system times
> - * @real: Realtime system time
> - * @boot: Boot time
> - * @raw: Monotonic raw system time
> - * @cs_id: Clocksource ID
> + * struct system_time_snapshot - Simultaneous time capture of CLOCK_MONOTONIC_RAW,
> + * a selected CLOCK_* and the clocksource counter value
> + * @cycles: Clocksource counter value to produce the system times
> + * @sys: The system time of the selected CLOCK ID
> + * @real: Realtime system time
> + * @boot: Boot time
> + * @raw: Monotonic raw system time
> + * @cs_id: Clocksource ID
> * @clock_was_set_seq: The sequence number of clock-was-set events
> * @cs_was_changed_seq: The sequence number of clocksource change events
> + * @valid: True if the snapshot is valid
> */
> struct system_time_snapshot {
> u64 cycles;
> + ktime_t sys;
> ktime_t real;
> ktime_t boot;
> ktime_t raw;
> enum clocksource_ids cs_id;
> unsigned int clock_was_set_seq;
> u8 cs_was_changed_seq;
> + u8 valid;
> };
>
> /**
> @@ -341,9 +345,16 @@ extern int get_device_system_crosststamp
> struct system_device_crosststamp *xtstamp);
>
> /*
> - * Simultaneously snapshot realtime and monotonic raw clocks
> + * Simultaneously snapshot a given clock with MONOTONIC_RAW and the underlying
> + * clocksource counter value.
> */
> -extern void ktime_get_snapshot(struct system_time_snapshot *systime_snapshot);
> +extern bool ktime_get_snapshot_id(struct system_time_snapshot *systime_snapshot,
> + clockid_t clock_id);
None of the callers (except the wrapper below, which gets removed later) is
checking the return value. Having both the return value and the valid member
looks a bit weird, too.
Clockid parameter first for consistency?
> +
> +static inline void ktime_get_snapshot(struct system_time_snapshot *systime_snapshot)
> +{
> + WARN_ON_ONCE(!ktime_get_snapshot_id(systime_snapshot, CLOCK_REALTIME));
> +}
>
> /*
> * Persistent clock related interfaces
> --- a/kernel/time/timekeeping.c
> +++ b/kernel/time/timekeeping.c
> @@ -1183,43 +1183,87 @@ noinstr time64_t __ktime_get_real_second
> }
>
> /**
> - * ktime_get_snapshot - snapshots the realtime/monotonic raw clocks with counter
> - * @systime_snapshot: pointer to struct receiving the system time snapshot
> + * ktime_get_snapshot_id - Simultaneously snapshot a given clock ID with
> + * CLOCK_MONOTONIC_RAW and the underlying
> + * clocksource counter value.
> + * @systime_snapshot: Pointer to struct receiving the system time snapshot
> + * @clock_id: The clock ID to snapshot
> */
> -void ktime_get_snapshot(struct system_time_snapshot *systime_snapshot)
> +bool ktime_get_snapshot_id(struct system_time_snapshot *systime_snapshot, clockid_t clock_id)
> {
> - struct timekeeper *tk = &tk_core.timekeeper;
> + ktime_t base_raw, base_sys, offs_sys, *offs, offs_zero = 0;
> + u64 nsec_raw, nsec_sys, now;
> + struct timekeeper *tk;
> + struct tk_data *tkd;
This indirection only makes sense with the support for AUX clocks added later.
> unsigned int seq;
> - ktime_t base_raw;
> ktime_t base_real;
> ktime_t base_boot;
The ktime_t variable declarations are weird now.
> - u64 nsec_raw;
> - u64 nsec_real;
> - u64 now;
>
> - WARN_ON_ONCE(timekeeping_suspended);
> + /* Invalidate the snapshot for all failure cases */
> + systime_snapshot->valid = false;
> +
> + if (WARN_ON_ONCE(timekeeping_suspended))
> + return false;
> +
> + switch (clock_id) {
> + case CLOCK_REALTIME:
> + tkd = &tk_core;
> + offs = &tk_core.timekeeper.offs_real;
> + break;
> + /* Map RAW to MONOTONIC so the loop below is trivial */
> + case CLOCK_MONOTONIC_RAW:
> + case CLOCK_MONOTONIC:
> + tkd = &tk_core;
> + offs = &offs_zero;
> + break;
> + case CLOCK_BOOTTIME:
> + tkd = &tk_core;
> + offs = &tk_core.timekeeper.offs_boot;
> + break;
> + default:
> + WARN_ON_ONCE(1);
> + return false;
> + }
> +
> + tk = &tkd->timekeeper;
>
> do {
> - seq = read_seqcount_begin(&tk_core.seq);
> + seq = read_seqcount_begin(&tkd->seq);
> +
> now = tk_clock_read(&tk->tkr_mono);
> systime_snapshot->cs_id = tk->tkr_mono.clock->id;
> systime_snapshot->cs_was_changed_seq = tk->cs_was_changed_seq;
> systime_snapshot->clock_was_set_seq = tk->clock_was_set_seq;
> - base_real = ktime_add(tk->tkr_mono.base,
> - tk_core.timekeeper.offs_real);
> - base_boot = ktime_add(tk->tkr_mono.base,
> - tk_core.timekeeper.offs_boot);
> +
> + base_sys = tk->tkr_mono.base;
> + offs_sys = *offs;
> base_raw = tk->tkr_raw.base;
> - nsec_real = timekeeping_cycles_to_ns(&tk->tkr_mono, now);
> - nsec_raw = timekeeping_cycles_to_ns(&tk->tkr_raw, now);
> - } while (read_seqcount_retry(&tk_core.seq, seq));
> +
> + /* Kept around until the callers are fixed up */
> + base_real = ktime_add(base_sys, tk_core.timekeeper.offs_real);
> + base_boot = ktime_add(base_sys, tk_core.timekeeper.offs_boot);
> +
> + nsec_sys = timekeeping_cycles_to_ns(&tk->tkr_mono, now);
> + nsec_raw = timekeeping_cycles_to_ns(&tk->tkr_raw, now);
> + } while (read_seqcount_retry(&tkd->seq, seq));
>
> systime_snapshot->cycles = now;
> - systime_snapshot->real = ktime_add_ns(base_real, nsec_real);
> - systime_snapshot->boot = ktime_add_ns(base_boot, nsec_real);
> + systime_snapshot->sys = ktime_add_ns(base_sys, offs_sys + nsec_sys);
Technically offs_sys is ktime_t and not u64, so would need ktime_add().
(Not that it makes a difference)
> + systime_snapshot->real = ktime_add_ns(base_real, nsec_sys);
> + systime_snapshot->boot = ktime_add_ns(base_boot, nsec_sys);
> systime_snapshot->raw = ktime_add_ns(base_raw, nsec_raw);
> +
> + /*
> + * Special case for PTP. Just transfer the raw time into sys,
> + * so the call sites can consistently use snap::sys.
> + */
> + if (clock_id == CLOCK_MONOTONIC_RAW)
> + systime_snapshot->sys = systime_snapshot->raw;
> + /* Tell the consumer that this snapshot is valid */
> + systime_snapshot->valid = true;
> + return true;
> }
> -EXPORT_SYMBOL_GPL(ktime_get_snapshot);
> +EXPORT_SYMBOL_GPL(ktime_get_snapshot_id);
>
> /* Scale base by mult/div checking for overflow */
> static int scale64_check_overflow(u64 mult, u64 div, u64 *base)
>
^ permalink raw reply
* Re: [PATCH v8 00/37] mm/virtio: skip redundant zeroing of host-zeroed pages
From: Miaohe Lin @ 2026-05-27 6:40 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: linux-kernel, David Hildenbrand (Arm), Jason Wang, Xuan Zhuo,
Eugenio Pérez, Muchun Song, Oscar Salvador, Andrew Morton,
Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Brendan Jackman,
Johannes Weiner, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts,
Dev Jain, Barry Song, Lance Yang, Hugh Dickins, Matthew Brost,
Joshua Hahn, Rakie Kim, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple, Christoph Lameter, David Rientjes,
Roman Gushchin, Harry Yoo, Axel Rasmussen, Yuanchu Xie, Wei Xu,
Chris Li, Kairui Song, Kemeng Shi, Nhat Pham, Baoquan He,
virtualization, linux-mm, Andrea Arcangeli
In-Reply-To: <20260527012249-mutt-send-email-mst@kernel.org>
On 2026/5/27 13:25, Michael S. Tsirkin wrote:
> On Wed, May 27, 2026 at 11:23:23AM +0800, Miaohe Lin wrote:
>> On 2026/5/21 22:09, Michael S. Tsirkin wrote:
>>> On Wed, May 20, 2026 at 06:20:13PM -0400, Michael S. Tsirkin wrote:
>>>> When a guest reports free pages to the hypervisor via virtio-balloon's
>>>> free page reporting, the host typically zeros those pages when reclaiming
>>>> their backing memory (e.g., via MADV_DONTNEED on anonymous mappings).
>>>> When the guest later reallocates those pages, the kernel zeros them
>>>> again, redundantly.
>>>
>>> FYI Sashiko reported a couple of issues. Mostly false positives but
>>> I tweaked commit log to make it clearer. But also a couple of
>>> real issues. So far I have this diff on top:
>>>
>>> --->
>>>
>>> Changes from v8 to v9 candidate (code only):
>>>
>>> 1. mm/mempolicy.c (patch 1: mm: mempolicy: fix interleave index calculation)
>>> Combine vm_pgoff and VMA offset into a single expression before
>>> shifting, fixing carry loss for file-backed VMAs with unaligned
>>> vm_pgoff.
>>>
>>> 2. mm/memory-failure.c (patch 2: mm: memory-failure: serialize TestSetPageHWPoison with zone->lock)
>>> Wrap ClearPageHWPoison in retry path with zone->lock too.
>>
>> It seems TestClearPageHWPoison and SetPageHWPoison are missing. Should we serialize them with zone->lock too?
>>
>> Thanks.
>> .
>
> I don't think so. As far as I could tell, none of these are called on
> pages that could be in the buddy. And all the non atomic page flags
> games we play are only on pages in the buddy.
I scanned the code and it seems no one breaks the game. So I agree with you.
Thanks.
.
^ permalink raw reply
* Re: [PATCH v8 00/37] mm/virtio: skip redundant zeroing of host-zeroed pages
From: Michael S. Tsirkin @ 2026-05-27 5:25 UTC (permalink / raw)
To: Miaohe Lin
Cc: linux-kernel, David Hildenbrand (Arm), Jason Wang, Xuan Zhuo,
Eugenio Pérez, Muchun Song, Oscar Salvador, Andrew Morton,
Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Brendan Jackman,
Johannes Weiner, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts,
Dev Jain, Barry Song, Lance Yang, Hugh Dickins, Matthew Brost,
Joshua Hahn, Rakie Kim, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple, Christoph Lameter, David Rientjes,
Roman Gushchin, Harry Yoo, Axel Rasmussen, Yuanchu Xie, Wei Xu,
Chris Li, Kairui Song, Kemeng Shi, Nhat Pham, Baoquan He,
virtualization, linux-mm, Andrea Arcangeli
In-Reply-To: <eda29390-94a2-c4f6-a3e3-32bea8c6b363@huawei.com>
On Wed, May 27, 2026 at 11:23:23AM +0800, Miaohe Lin wrote:
> On 2026/5/21 22:09, Michael S. Tsirkin wrote:
> > On Wed, May 20, 2026 at 06:20:13PM -0400, Michael S. Tsirkin wrote:
> >> When a guest reports free pages to the hypervisor via virtio-balloon's
> >> free page reporting, the host typically zeros those pages when reclaiming
> >> their backing memory (e.g., via MADV_DONTNEED on anonymous mappings).
> >> When the guest later reallocates those pages, the kernel zeros them
> >> again, redundantly.
> >
> > FYI Sashiko reported a couple of issues. Mostly false positives but
> > I tweaked commit log to make it clearer. But also a couple of
> > real issues. So far I have this diff on top:
> >
> > --->
> >
> > Changes from v8 to v9 candidate (code only):
> >
> > 1. mm/mempolicy.c (patch 1: mm: mempolicy: fix interleave index calculation)
> > Combine vm_pgoff and VMA offset into a single expression before
> > shifting, fixing carry loss for file-backed VMAs with unaligned
> > vm_pgoff.
> >
> > 2. mm/memory-failure.c (patch 2: mm: memory-failure: serialize TestSetPageHWPoison with zone->lock)
> > Wrap ClearPageHWPoison in retry path with zone->lock too.
>
> It seems TestClearPageHWPoison and SetPageHWPoison are missing. Should we serialize them with zone->lock too?
>
> Thanks.
> .
I don't think so. As far as I could tell, none of these are called on
pages that could be in the buddy. And all the non atomic page flags
games we play are only on pages in the buddy.
--
MST
^ permalink raw reply
* Re: [PATCH 0/24] timekeeping/ptp: Expand snapshot functionality
From: Arthur Kiyanovski @ 2026-05-27 3:55 UTC (permalink / raw)
To: tglx
Cc: akiyano, anna-maria, anthony.l.nguyen, dwmw2, frederic, giometti,
jacob.e.keller, johannes.berg, jstultz, kvmarm, linux-kernel,
linux-sound, linux-wireless, maz, miriam.rachel.korenblit,
mlichvar, mst, netdev, oliver.upton, oupton, peter.hilber,
richardcochran, saeedm, sboyd, thomas.weissschuh, tiwai,
vdonnefort, virtualization
In-Reply-To: <20260526165826.392227559@kernel.org>
Tested with a locally rebased version of my PTP clock attributes series [1]
on top — verified ENA PHC and ptp_vmclock attrs ioctls on x86_64.
[1] https://lore.kernel.org/netdev/20260515164033.6403-1-akiyano@amazon.com/
Tested-by: Arthur Kiyanovski <akiyano@amazon.com>
^ permalink raw reply
* Re: [PATCH v8 00/37] mm/virtio: skip redundant zeroing of host-zeroed pages
From: Miaohe Lin @ 2026-05-27 3:23 UTC (permalink / raw)
To: Michael S. Tsirkin, linux-kernel
Cc: David Hildenbrand (Arm), Jason Wang, Xuan Zhuo,
Eugenio Pérez, Muchun Song, Oscar Salvador, Andrew Morton,
Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Brendan Jackman,
Johannes Weiner, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts,
Dev Jain, Barry Song, Lance Yang, Hugh Dickins, Matthew Brost,
Joshua Hahn, Rakie Kim, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple, Christoph Lameter, David Rientjes,
Roman Gushchin, Harry Yoo, Axel Rasmussen, Yuanchu Xie, Wei Xu,
Chris Li, Kairui Song, Kemeng Shi, Nhat Pham, Baoquan He,
virtualization, linux-mm, Andrea Arcangeli
In-Reply-To: <20260521100313-mutt-send-email-mst@kernel.org>
On 2026/5/21 22:09, Michael S. Tsirkin wrote:
> On Wed, May 20, 2026 at 06:20:13PM -0400, Michael S. Tsirkin wrote:
>> When a guest reports free pages to the hypervisor via virtio-balloon's
>> free page reporting, the host typically zeros those pages when reclaiming
>> their backing memory (e.g., via MADV_DONTNEED on anonymous mappings).
>> When the guest later reallocates those pages, the kernel zeros them
>> again, redundantly.
>
> FYI Sashiko reported a couple of issues. Mostly false positives but
> I tweaked commit log to make it clearer. But also a couple of
> real issues. So far I have this diff on top:
>
> --->
>
> Changes from v8 to v9 candidate (code only):
>
> 1. mm/mempolicy.c (patch 1: mm: mempolicy: fix interleave index calculation)
> Combine vm_pgoff and VMA offset into a single expression before
> shifting, fixing carry loss for file-backed VMAs with unaligned
> vm_pgoff.
>
> 2. mm/memory-failure.c (patch 2: mm: memory-failure: serialize TestSetPageHWPoison with zone->lock)
> Wrap ClearPageHWPoison in retry path with zone->lock too.
It seems TestClearPageHWPoison and SetPageHWPoison are missing. Should we serialize them with zone->lock too?
Thanks.
.
^ permalink raw reply
* Re: [PATCH net] vsock/virtio: bind uarg before filling zerocopy skb
From: malin (R) @ 2026-05-27 2:42 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Arseniy Krasnov, tanjingguo, mst@redhat.com, jasowang@redhat.com,
xuanzhuo@linux.alibaba.com, eperezma@redhat.com,
stefanha@redhat.com, sgarzare@redhat.com, davem@davemloft.net,
edumazet@google.com, pabeni@redhat.com, horms@kernel.org, Chenzhe,
cenxianlong, cuirongzhen, virtualization@lists.linux.dev,
kvm@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Hello Jakub,
> The email headers are duplicated on this patch.
> This appears to confuse git am into thinking the patch is empty:
>
> $ git am mbox
> Patch is empty.
>
> Please fix this and repost (please add the review tags you already
> received in the repost)
My bad. I have sent the right post with git command.
https://lore.kernel.org/netdev/20260527023301.1075581-1-malin89@huawei.com/T/#u
Please let me know if there is any other problem.
Thanks
Lin
^ permalink raw reply
* [PATCH net v2] vsock/virtio: bind uarg before filling zerocopy skb
From: Lin Ma @ 2026-05-27 2:33 UTC (permalink / raw)
To: kuba, avkrasnov, cenxianlong, chenzhe, cuirongzhen, davem,
edumazet, eperezma, horms, jasowang, kvm, linux-kernel, malin89,
mst, netdev, pabeni, sgarzare, stefanha, tanjingguo,
virtualization, xuanzhuo
From: Jingguo Tan <tanjingguo@huawei.com>
virtio_transport_send_pkt_info() allocates or reuses the zerocopy uarg
before entering the send loop, but virtio_transport_alloc_skb() still
fills the skb before it inherits that uarg. When fixed-buffer vectored
zerocopy hits MAX_SKB_FRAGS, io_sg_from_iter() may partially attach
managed frags and return -EMSGSIZE. The rollback path call kfree_skb()
to free an skb that carries SKBFL_MANAGED_FRAG_REFS but no uarg, so
skb_release_data() falls through to ordinary frag unref.
Pass the uarg into virtio_transport_alloc_skb() and bind it immediately
before virtio_transport_fill_skb(). This keeps control or no-payload skbs
untouched while ensuring success and rollback share one lifetime rule.
Fixes: 581512a6dc93 ("vsock/virtio: MSG_ZEROCOPY flag support")
Signed-off-by: Lin Ma <malin89@huawei.com>
Signed-off-by: Rongzhen Cui <cuirongzhen@huawei.com>
Signed-off-by: Jingguo Tan <tanjingguo@huawei.com>
Acked-by: Arseniy Krasnov <avkrasnov@salutedevices.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
---
v1->v2 changes:
* add acked and review tags.
* repost to avoid duplicated subject.
net/vmw_vsock/virtio_transport_common.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c
index df3b418e0392..73f58925ff72 100644
--- a/net/vmw_vsock/virtio_transport_common.c
+++ b/net/vmw_vsock/virtio_transport_common.c
@@ -205,6 +205,7 @@ static u16 virtio_transport_get_type(struct sock *sk)
static struct sk_buff *virtio_transport_alloc_skb(struct virtio_vsock_pkt_info *info,
size_t payload_len,
bool zcopy,
+ struct ubuf_info *uarg,
u32 src_cid,
u32 src_port,
u32 dst_cid,
@@ -245,6 +246,11 @@ static struct sk_buff *virtio_transport_alloc_skb(struct virtio_vsock_pkt_info *
if (info->msg && payload_len > 0) {
int err;
+ /* Bind the zerocopy lifetime before filling frags so error rollback
+ * frees managed fixed-buffer pages through the uarg-aware path.
+ */
+ skb_zcopy_set(skb, uarg, NULL);
+
err = virtio_transport_fill_skb(skb, info, payload_len, zcopy);
if (err)
goto out;
@@ -364,6 +370,7 @@ static int virtio_transport_send_pkt_info(struct vsock_sock *vsk,
skb_len = min(max_skb_len, rest_len);
skb = virtio_transport_alloc_skb(info, skb_len, can_zcopy,
+ uarg,
src_cid, src_port,
dst_cid, dst_port);
if (!skb) {
@@ -371,8 +378,6 @@ static int virtio_transport_send_pkt_info(struct vsock_sock *vsk,
break;
}
- skb_zcopy_set(skb, uarg, NULL);
-
virtio_transport_inc_tx_pkt(vvs, skb);
ret = t_ops->send_pkt(skb, info->net);
@@ -1183,7 +1188,7 @@ static int virtio_transport_reset_no_sock(const struct virtio_transport *t,
if (!t)
return -ENOTCONN;
- reply = virtio_transport_alloc_skb(&info, 0, false,
+ reply = virtio_transport_alloc_skb(&info, 0, false, NULL,
le64_to_cpu(hdr->dst_cid),
le32_to_cpu(hdr->dst_port),
le64_to_cpu(hdr->src_cid),
--
2.53.0
^ permalink raw reply related
* Re: [PATCH net] vsock/virtio: bind uarg before filling zerocopy skb
From: Jakub Kicinski @ 2026-05-27 1:46 UTC (permalink / raw)
To: malin (R)
Cc: Arseniy Krasnov, tanjingguo, mst@redhat.com, jasowang@redhat.com,
xuanzhuo@linux.alibaba.com, eperezma@redhat.com,
stefanha@redhat.com, sgarzare@redhat.com, davem@davemloft.net,
edumazet@google.com, pabeni@redhat.com, horms@kernel.org, Chenzhe,
cenxianlong, cuirongzhen, virtualization@lists.linux.dev,
kvm@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
In-Reply-To: <9fece5ea269049f883f367642c07eaa0@huawei.com>
On Mon, 25 May 2026 11:15:12 +0000 malin (R) wrote:
> Subject: [PATCH net] vsock/virtio: bind uarg before filling zerocopy skb
> Date: Mon, 25 May 2026 11:15:12 +0000
>
> From 9eea4f61a4dca97f56c23e12267219bf791a20d1 Mon Sep 17 00:00:00 2001
> From: Jingguo Tan <tanjingguo@huawei.com>
> Date: Fri, 22 May 2026 19:53:45 +0800
> Subject: [PATCH net] vsock/virtio: bind uarg before filling zerocopy skb
The email headers are duplicated on this patch.
This appears to confuse git am into thinking the patch is empty:
$ git am mbox
Patch is empty.
Please fix this and repost (please add the review tags you already
received in the repost)
--
pw-bot: cr
^ permalink raw reply
* Re: [PATCH 7.2 v10 1/2] mm/mmu_gather: prepare to skip redundant sync IPIs
From: Andrew Morton @ 2026-05-27 1:44 UTC (permalink / raw)
To: Dave Hansen
Cc: Peter Zijlstra, Lance Yang, david, dave.hansen, ypodemsk, hughd,
will, aneesh.kumar, npiggin, tglx, mingo, bp, x86, hpa, arnd, ljs,
ziy, baolin.wang, Liam.Howlett, npache, ryan.roberts, dev.jain,
baohua, shy828301, riel, jannh, jgross, seanjc, pbonzini,
boris.ostrovsky, virtualization, kvm, linux-arch, linux-mm,
linux-kernel, ioworker0
In-Reply-To: <f437455d-1598-483d-9dcf-1932d265ef3f@intel.com>
On Fri, 24 Apr 2026 08:52:16 -0700 Dave Hansen <dave.hansen@intel.com> wrote:
> On 4/24/26 08:04, Peter Zijlstra wrote:
> > So I don't like this at all.... The comment says there is a preceding
> > TLB flush, but there is nothing that guarantees there is. One would have
> > to go audit all users and ensure this is always true.
> >
> > This thing is incredibly fragile.
>
> Yeah, this seems like an attempt to apply a code solution to a data
> structure problem.
>
> I think I talked about this in earlier iterations. But, ideally, what
> happens here is that the things doing the table freeing or collapsing or
> whatever would note in a data structure what they did.
>
> Then the actual flushing code can look at the data structure and figure
> out what kind of flush it needs. Things like "do I need to flush on lazy
> CPUs?" Or, "have I done an IPI since the last page table free?"
>
> But, if I remember from earlier in this thread, some of the callers of
> this stuff didn't have a nice data structure (like an mmu_gather) passed
> in to the places where it would be needed to exfiltrate the information.
>
> I think Lance gave up on that because it looked too invasive to him.
>
> But, I think this boils down to the code being too fragile as-is to
> support what Lance is trying to do. It actually needs some refactoring
> love before it can support the desired optimization. I'm not sure
> there's an easy way out here.
Well this is a bummer. Looky:
> On a 64-core Intel x86 server, the CAL interrupt count in
> /proc/interrupts dropped from 646,316 to 785 when collapsing a 20 GiB
> range with this series applied.
It would have been nice.
Oh well, it's been a month with no progress so this patchset appears to
be before its time. Thanks all, I'll drop this from the 7.1 queue.
(otoh, "a month with no progress" == "decently tested")!
^ permalink raw reply
* Re: [PATCH 24/24] ptp: Switch to ktime_get_snapshot_id() for pre/post timestamps
From: David Woodhouse @ 2026-05-26 23:57 UTC (permalink / raw)
To: tglx
Cc: akiyano, anna-maria, anthony.l.nguyen, dwmw2, frederic, giometti,
jacob.e.keller, johannes.berg, jstultz, kvmarm, linux-kernel,
linux-sound, linux-wireless, maz, miriam.rachel.korenblit,
mlichvar, mst, netdev, oliver.upton, oupton, peter.hilber,
richardcochran, saeedm, sboyd, thomas.weissschuh, tiwai,
vdonnefort, virtualization
In-Reply-To: <20260526171224.499777655@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 550 bytes --]
On Tue, 26 May 2026 19:15:27 +0200, Thomas Gleixner wrote:
> To prepare for a new PTP IOCTL, which exposes the raw counter value along
> with the requested system time snapshot, switch the pre/post time stamp
> sampling over to use ktime_get_snapshot_id() and fix up all usage sites.
>
> No functional change intended.
>
> The ptp_vmclock conversion was simplified by David Woodhouse.
>
> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
Tested-by: David Woodhouse <dwmw@amazon.co.uk>
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5069 bytes --]
^ permalink raw reply
* Re: [PATCH 23/24] timekeeping: Add support for AUX clock cross timestamping
From: David Woodhouse @ 2026-05-26 23:56 UTC (permalink / raw)
To: tglx
Cc: akiyano, anna-maria, anthony.l.nguyen, dwmw2, frederic, giometti,
jacob.e.keller, johannes.berg, jstultz, kvmarm, linux-kernel,
linux-sound, linux-wireless, maz, miriam.rachel.korenblit,
mlichvar, mst, netdev, oliver.upton, oupton, peter.hilber,
richardcochran, saeedm, sboyd, thomas.weissschuh, tiwai,
vdonnefort, virtualization
In-Reply-To: <20260526171224.423155175@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 374 bytes --]
On Tue, 26 May 2026 19:15:22 +0200, Thomas Gleixner wrote:
> Now that all prerequisites are in place add the final support for AUX
> clocks in get_device_system_crosststamp(), which enables the PTP layer to
> support hardware cross timestamps with a new IOTCL.
>
> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5069 bytes --]
^ permalink raw reply
* Re: [PATCH 22/24] timekeeping: Remove system_device_crosststamp::sys_realtime
From: David Woodhouse @ 2026-05-26 23:56 UTC (permalink / raw)
To: tglx
Cc: akiyano, anna-maria, anthony.l.nguyen, dwmw2, frederic, giometti,
jacob.e.keller, johannes.berg, jstultz, kvmarm, linux-kernel,
linux-sound, linux-wireless, maz, miriam.rachel.korenblit,
mlichvar, mst, netdev, oliver.upton, oupton, peter.hilber,
richardcochran, saeedm, sboyd, thomas.weissschuh, tiwai,
vdonnefort, virtualization
In-Reply-To: <20260526171224.347997043@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 260 bytes --]
On Tue, 26 May 2026 19:15:17 +0200, Thomas Gleixner wrote:
> All users are converted to sys_systime.
>
> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
Tested-by: David Woodhouse <dwmw@amazon.co.uk>
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5069 bytes --]
^ permalink raw reply
* Re: [PATCH 21/24] ALSA: hda/common: Use system_device_crosststamp::sys_systime
From: David Woodhouse @ 2026-05-26 23:55 UTC (permalink / raw)
To: tglx
Cc: akiyano, anna-maria, anthony.l.nguyen, dwmw2, frederic, giometti,
jacob.e.keller, johannes.berg, jstultz, kvmarm, linux-kernel,
linux-sound, linux-wireless, maz, miriam.rachel.korenblit,
mlichvar, mst, netdev, oliver.upton, oupton, peter.hilber,
richardcochran, saeedm, sboyd, thomas.weissschuh, tiwai,
vdonnefort, virtualization
In-Reply-To: <20260526171224.274187786@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 322 bytes --]
On Tue, 26 May 2026 19:15:12 +0200, Thomas Gleixner wrote:
> sys_systime is an alias for sys_realtime. The latter will be removed so
> switch the code over to the new naming scheme.
>
> No functional change.
>
> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5069 bytes --]
^ permalink raw reply
* Re: [PATCH 20/24] wifi: iwlwifi: Use system_device_crosststamp::sys_systime
From: David Woodhouse @ 2026-05-26 23:55 UTC (permalink / raw)
To: tglx
Cc: akiyano, anna-maria, anthony.l.nguyen, dwmw2, frederic, giometti,
jacob.e.keller, johannes.berg, jstultz, kvmarm, linux-kernel,
linux-sound, linux-wireless, maz, miriam.rachel.korenblit,
mlichvar, mst, netdev, oliver.upton, oupton, peter.hilber,
richardcochran, saeedm, sboyd, thomas.weissschuh, tiwai,
vdonnefort, virtualization
In-Reply-To: <20260526171224.198945692@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 322 bytes --]
On Tue, 26 May 2026 19:15:07 +0200, Thomas Gleixner wrote:
> sys_systime is an alias for sys_realtime. The latter will be removed so
> switch the code over to the new naming scheme.
>
> No functional change.
>
> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5069 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox