Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1527990

Re: [PATCH v2 1/2] timekeeping: Introduce a fast boot clock derived from fast monotonic clock

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/2] timekeeping: Introduce a fast boot clock derived from fast monotonic clock
Date 2016-11-22 23:40 +0100
Message-ID <sGrTk-4Sy-15@gated-at.bofh.it> (permalink)
References <sG56q-77c-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 21 Nov 2016, Joel Fernandes wrote:
> @@ -56,6 +56,12 @@ static struct timekeeper shadow_timekeeper;
>  struct tk_fast {
>  	seqcount_t		seq;
>  	struct tk_read_base	base[2];
> +
> +	/*
> +	 * first dimension is based on lower seq bit,
> +	 * second dimension is for offset type (real, boot, tai)
> +	 */

Can you figure out why there are comments above the struct which explain
the members in Kernel Doc format and not randomly formatted comments inside
the struct definition?

> +	ktime_t			offsets[2][TK_OFFS_MAX];

This bloats fast_tk_raw for no value, along with the extra stores in the
update function for fast_tk_raw which will never use that offset stuff.

Aside of that, I really have to ask the question whether it's really
necessary to add this extra bloat in storage, update and readout code for
something which is not used by most people.

What's wrong with adding a tracepoint into the boot offset update function
and let perf or the tracer inject the value of the boot offset into the
trace data when starting. The time adjustment can be done in
postprocessing.

That should be sufficient for tracing suspend/resume behaviour. If there is
not a really convincing reason for having that as a real trace clock then I
prefer to avoid that extra stuff.

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 1/2] timekeeping: Introduce a fast boot clock derived from fast monotonic clock Joel Fernandes <joelaf@google.com> - 2016-11-21 23:20 +0100
  Re: [PATCH v2 1/2] timekeeping: Introduce a fast boot clock derived  from fast monotonic clock Thomas Gleixner <tglx@linutronix.de> - 2016-11-22 23:40 +0100
    Re: [PATCH v2 1/2] timekeeping: Introduce a fast boot clock derived  from fast monotonic clock Joel Fernandes <joelaf@google.com> - 2016-11-23 01:30 +0100
      Re: [PATCH v2 1/2] timekeeping: Introduce a fast boot clock derived  from fast monotonic clock Joel Fernandes <joelaf@google.com> - 2016-11-23 01:30 +0100
      Re: [PATCH v2 1/2] timekeeping: Introduce a fast boot clock derived  from fast monotonic clock Thomas Gleixner <tglx@linutronix.de> - 2016-11-23 11:30 +0100

csiph-web