mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: Shy Shuky <rousya@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	"Ingo Molnar" <mingo@redhat.com>,
	Mauro Chehab <m.chehab@samsung.com>,
	"xiexiuqi@huawei.com" <xiexiuqi@huawei.com>
Subject: Re: [PATCH] time: Provide full featured jiffies_to_nsecs() function
Date: Fri, 16 May 2014 15:02:10 -0400	[thread overview]
Message-ID: <20140516150210.0ae55bcd@gandalf.local.home> (raw)
In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F3280B567@ORSMSX114.amr.corp.intel.com>

On Fri, 16 May 2014 17:17:46 +0000
"Luck, Tony" <tony.luck@intel.com> wrote:

> Is this function safe to call in every context (including NMI & machine check)?
> [it uses read_seqcount_begin/read_seqcount_retry ... which I *think* is
> safe ... but this stuff is tricky, so I'd like some reassurance].

No, read_seqcount_begin() is not safe in NMI context. If it interrupts
a write, it goes into an infinite spin (see __read_seqcount_begin()).

> 
> Mauro, Steven: Did we just do math on jiffies because we wanted less overhead
> in a tracepoint?

As I meantioned. read_seqcount_begin() is not safe for tracing, it
had to be reimplemented.

-- Steve

> 
> Bigger question (mostly for Mauro) ... what was the motivation for the "uptime"
> tracer to begin with?  The rasdaemon code that is using it converts the times
> from traces into absolute times (by adding an offset it computes by comparing
> uptime and gettimeofday() when it starts).  But this would seem to be fraught
> with problems:
> 1) Do we get this right for events that happen in daylight saving time shift windows?
> 2) Is there a "drift" problem for systems that stay up for months and rely on ntp
> to keep wall clock time in line with reality?
> 
> -Tony


  reply	other threads:[~2014-05-16 19:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-07 22:25 [RFC PATCH] time: Fix truncation in jiffies_to_usecs() Tony Luck
2014-04-08  5:34 ` Tony Luck
2014-04-08 15:27   ` Steven Rostedt
2014-04-08 17:49   ` Frederic Weisbecker
2014-04-08 18:15     ` Steven Rostedt
2014-04-08 18:56       ` Frederic Weisbecker
2014-04-08 19:34         ` Steven Rostedt
2014-04-08 17:32           ` [PATCH] time: Provide full featured jiffies_to_nsecs() function Tony Luck
2014-04-09 16:53             ` Tony Luck
2014-05-09 21:46               ` Luck, Tony
2014-05-16 14:24             ` Shy Shuky
2014-05-16 17:17               ` Luck, Tony
2014-05-16 19:02                 ` Steven Rostedt [this message]
2014-05-19  1:28             ` Xie XiuQi
2014-05-19 22:35               ` Luck, Tony
2014-06-28 11:56                 ` Xie XiuQi

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=20140516150210.0ae55bcd@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=mingo@redhat.com \
    --cc=rousya@gmail.com \
    --cc=tony.luck@intel.com \
    --cc=xiexiuqi@huawei.com \
    /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

all inboxes | Powered by JetHome®