All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Andy Lutomirski <luto@amacapital.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org,
	Stephane Eranian <eranian@google.com>,
	Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 1/1] perf/x86: Fix time_shift in perf_event_mmap_page
Date: Mon, 19 Oct 2015 13:21:26 +0200	[thread overview]
Message-ID: <20151019112126.GA32722@gmail.com> (raw)
In-Reply-To: <5624ADF8.3090505@intel.com>


* Adrian Hunter <adrian.hunter@intel.com> wrote:

> On 19/10/15 11:08, Ingo Molnar wrote:
> > 
> > * Adrian Hunter <adrian.hunter@intel.com> wrote:
> > 
> >> Commit b20112edeadf ("perf/x86: Improve accuracy of perf/sched clock")
> >> allowed the time_shift value in perf_event_mmap_page to be as much
> >> as 32.  Unfortunately the documented algorithms for using time_shift
> >> have it shifting an integer, whereas to work correctly with the value
> >> 32, the type must be u64.
> >>
> >> Fix by limiting the shift to 31 and adjusting the multiplier accordingly.
> >>
> >> Also update the documentation of perf_event_mmap_page so that new code
> >> based on it will be more future-proof.
> >>
> >> Fixes: b20112edeadf ("perf/x86: Improve accuracy of perf/sched clock")
> >> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> > 
> > Would be nice to point out via what symptoms the code misbehaves and how users 
> > notice.
> 
> In the case of perf tools, Intel PT decodes correctly but the timestamps
> that are output (for example by perf script) have lost 32-bits of
> granularity so they look like they are not changing at all.

Sounds like a nice and very informative paragraph to add to the changelog! :-)

Thanks,

	Ingo

  reply	other threads:[~2015-10-19 11:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-16 13:24 [PATCH 0/1] perf/x86: Fix time_shift in perf_event_mmap_page Adrian Hunter
2015-10-16 13:24 ` [PATCH 1/1] " Adrian Hunter
2015-10-19  8:08   ` Ingo Molnar
2015-10-19  8:46     ` Adrian Hunter
2015-10-19 11:21       ` Ingo Molnar [this message]
2015-10-19 11:57         ` [PATCH V2 " Adrian Hunter
2015-10-20  9:35   ` [tip:perf/core] " tip-bot for Adrian Hunter

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=20151019112126.GA32722@gmail.com \
    --to=mingo@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.