lkml.org 
[lkml]   [2019]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sched_clock and device suspend/resume
On Wed, 10 Jul 2019 20:35:32 +0200 (CEST)
Thomas Gleixner <tglx@linutronix.de> wrote:

> On Wed, 10 Jul 2019, Steven Rostedt wrote:
>
> >
> > [ Resending as your Cc was screwed up and caused my reply to mess up
> > the Cc list ]
> >
> > On Wed, 10 Jul 2019 08:20:37 -0700
> > Sodagudi Prasad <psodagud@codeaurora.org> wrote:
> >
> > > Another option is printing the epoch/cycles information in every print
> > > statement similar to thread id or processor id added
> > > recently(CONFIG_PRINTK_CALLER). This can be avoided if we start
> > > accounting suspend time in sched_clock.
> >
> > Or another option is add a new clock that printk and tracing can use.
> > tracing already can switch between clocks trivially.
> >
> > sched_clock_continuous() ? (I know, horrible name), that simply keeps
> > track of the time delta at suspend and returns:
> >
> > sched_clock() + delta;
>
> Which you get already when you do
>
> # echo boot > /sys/kernel/debug/tracing/trace_clock
>

So basically the answer here is to change printk to use
ktime_get_boot_fast_ns() instead of local_clock()?

-- Steve

\
 
 \ /
  Last update: 2019-07-10 20:59    [W:0.125 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site