# Re: \[patch 08/24\] timekeeping: Remove system\_time\_snapshot::real/boot

- From: Jacob Keller \<jacob.e.keller@intel.com\>
- Date: 2026-05-26 21:49:20 
- List: netdev
- Page: https://ratatoskr.run/netdev/2026/05/17033503
- Thread: https://ratatoskr.run/kvmarm/2026/05/17032577/t.md

```text
On 5/26/2026 10:14 AM, Thomas Gleixner wrote:
> All users are converted over to ktime_get_snapshot_id() and
> system_time_snapshot::sys.
> 

I would have expected this to also remove ktime_get_snapshot() since the
description claims all users are converted to ktime_get_snapshot_id().

> Remove the leftovers.
> 
> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
> ---
>  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);
> -
>  		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);
>  
>  	/*
> 

```
