From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Sodagudi Prasad <psodagud@codeaurora.org>
Cc: pmladek@suse.com, sergey.senozhatsky@gmail.com,
rostedt@goodmis.org, linux-kernel@vger.kernel.org
Subject: Re: Time stamp value in printk records
Date: Tue, 1 Oct 2019 00:08:48 +0900 [thread overview]
Message-ID: <20190930150848.GA303191@tigerII.localdomain> (raw)
In-Reply-To: <7d1aee8505b91c460fee347ed4204b9a@codeaurora.org>
Hi,
On (09/30/19 06:33), Sodagudi Prasad wrote:
> From Qualcomm side, we would like to check with upstream team about adding
> Raw time stamp value to printk records. On Qualcomm soc, there are various
> DSPs subsystems are there - for example audio, video and modem DSPs.
> Adding raw timer value(along with sched_clock()) in the printk record helps
> in the following use cases –
> 1) To find out which subsystem crashed first - Whether application
> processor crashed first or DSP subsystem?
> 2) If there are any system stability issues on the DSP side, what is the
> activity on the APPS processor side during that time?
>
> Initially during the device boot up, printk shed_clock value can be matched
> with timer raw value used on the dsp subsystem, but after APPS processor
> suspends several times, we don’t have way to correlate the time stamp value
> on the DSP and APPS processor. All timers(both apps processor timer and dsp
> timers) are derived from globally always on timer on Qualcomm soc, So
> keeping global timer raw values in printk records and dsp logs help to
> correlate the activity of all the processors in SoC.
Off the top of my head - timestamps are really hard.
Not only because, as of now, we serialize printk() internally. But also
because a lot of things can happen on any CPU between the moment when event
occurs - printk() - and the moment when we read clocks. NMI, IRQ, preemption.
Consider the following case
CPU0 CPU1 CPU2 CPU3
printk() printk() printk() printk()
<<preemption>> <<irq>>
spin_lock(logbuf)
clock()
spin_unlock(logbuf) spin_lock(logbuf)
clock() <<iret>>
spin_unlock(logbuf) spin_lock(logbuf)
clock()
spin_lock(logbuf) spin_unlock(logbuf)
clock()
spin_unlock(logbuf)
-ss
next prev parent reply other threads:[~2019-09-30 15:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-30 13:33 Time stamp value in printk records Sodagudi Prasad
2019-09-30 13:53 ` Steven Rostedt
2019-09-30 15:08 ` Sergey Senozhatsky [this message]
2019-10-01 12:04 ` Petr Mladek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190930150848.GA303191@tigerII.localdomain \
--to=sergey.senozhatsky@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=psodagud@codeaurora.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox