[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190710113609.7b63c5d6@gandalf.local.home>
Date: Wed, 10 Jul 2019 11:36:09 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Sodagudi Prasad <psodagud@...eaurora.org>
Cc: tglx@...utronix.de, pasha.tatashin@...cle.com,
gregkh@...uxfoundation.org, sboyd@...eaurora.org,
john.stultz@...aro.org, chang-an.chen@...iatek.com,
mingo@...nel.org, pmladek@...e.com, sergey.senozhatsky@...il.com,
linux-kernel@...r.kernel.org, tsoni@...eaurora.org
Subject: Re: sched_clock and device suspend/resume
[ 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@...eaurora.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;
This will prevent other issues happening by modifying sched_clock(),
specifically, screwing up the scheduler (what sched_clock()'s main
purpose is for). We don't want the scheduler to think that a process
was running for hours when it has spent most of that time in the
suspend state. Which is probably your answer to why it was designed
that way.
-- Steve
Powered by blists - more mailing lists