From: Steven Rostedt <rostedt@goodmis.org>
To: Tony Luck <tony.luck@gmail.com>
Cc: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Ingo Molnar" <mingo@redhat.com>,
"Luck, Tony" <tony.luck@intel.com>,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
"<m.chehab@samsung.com> Xie XiuQi" <xiexiuqi@huawei.com>
Subject: Re: [PATCH-v2] tracing: Fix wraparound problems in "uptime" tracer
Date: Thu, 17 Jul 2014 22:08:49 -0400 [thread overview]
Message-ID: <20140717220849.735bec65@gandalf.local.home> (raw)
In-Reply-To: <CA+8MBbKgHqwzLbY17-6o_Y-EULatnXgTdgn2kUhhOabELYGV6w@mail.gmail.com>
On Thu, 17 Jul 2014 16:02:26 -0700
Tony Luck <tony.luck@gmail.com> wrote:
> On Mon, Jun 30, 2014 at 1:31 PM, Tony Luck <tony.luck@intel.com> wrote:
> > +#else
> > + jiffy *= HZ_TO_NSEC_NUM;
> > + do_div(jiffy, HZ_TO_NSEC_DEN);
> > + return jiffy;
> > +#endif
>
> Well that didn't work either. kernel/trace/trace_clock.c doesn't include
> timeconst.h - so we fail the compile because HZ_TO_NSEC_{NUM,DEN}
> aren't defined. a #include looks dicey because timeconst.h is a generated
> file up the the kernel/ level ... so getting Makefile dependencies right would
> be ugly.
>
> Do we really need to convert to nanoseconds? Couldn't we just return
> jiffies:
Sure, and we can make it a "counter". That is, the counters don't hide
1000 counts on output.
>
> u64 notrace trace_clock_jiffies(void)
> {
> return jiffies_64 - INITIAL_JIFFIES;
> }
>
> and leave it as an exercise to userspace to interpret that?
>
> -Tony
>
> [Yes, this changes the UI . but there can't be any serious users
> given that the existing UI only works for 1hr 11 minutes after each
> boot]
I doubt it will break any tools, so it's fine.
-- Steve
next prev parent reply other threads:[~2014-07-18 2:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-28 11:09 [PATCH 0/2] tracing: fix uptime overflow problem Xie XiuQi
2014-06-28 11:10 ` [PATCH 1/2] " Xie XiuQi
2014-06-30 15:10 ` Steven Rostedt
2014-06-30 18:17 ` [PATCH] tracing: Fix wraparound problems in "uptime" tracer Tony Luck
2014-06-30 18:40 ` Steven Rostedt
2014-06-30 20:31 ` [PATCH-v2] " Tony Luck
2014-07-17 23:02 ` Tony Luck
2014-07-18 2:08 ` Steven Rostedt [this message]
2014-07-18 17:05 ` Tony Luck
2014-07-18 17:36 ` Steven Rostedt
2014-07-18 18:43 ` [PATCH] " Tony Luck
2014-07-18 18:47 ` Steven Rostedt
2014-07-18 18:54 ` Tony Luck
2014-06-28 11:10 ` [PATCH 2/2] tracing: update Documentation/trace/ftrace.txt for uptime 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=20140717220849.735bec65@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tony.luck@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®