From: Peter Zijlstra <peterz@infradead.org>
To: kan.liang@linux.intel.com
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, ak@linux.intel.com
Subject: Re: [RESEND PATCH] perf/x86/intel: Fix inaccurate period in context switch for auto-reload
Date: Fri, 17 Jan 2020 09:58:23 +0100 [thread overview]
Message-ID: <20200117085823.GV2827@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20200116183154.20880-1-kan.liang@linux.intel.com>
On Thu, Jan 16, 2020 at 10:31:54AM -0800, kan.liang@linux.intel.com wrote:
> From: Kan Liang <kan.liang@linux.intel.com>
>
> Perf doesn't take the left period into account when auto-reload is
> enabled with fixed period sampling mode in context switch.
> Here is the ftrace when recording PEBS event with fixed period.
>
> #perf record -e cycles:p -c 2000000 -- ./triad_loop
>
> //Task is scheduled out
> triad_loop-17222 [000] d... 861765.878032: write_msr:
> MSR_CORE_PERF_GLOBAL_CTRL(38f), value 0 //Disable global counter
> triad_loop-17222 [000] d... 861765.878033: write_msr:
> MSR_IA32_PEBS_ENABLE(3f1), value 0 //Disable PEBS
> triad_loop-17222 [000] d... 861765.878033: write_msr:
> MSR_P6_EVNTSEL0(186), value 40003003c //Disable the counter
> triad_loop-17222 [000] d... 861765.878033: rdpmc: 0, value
> fffffff82840 //Read value of the counter
> triad_loop-17222 [000] d... 861765.878034: write_msr:
> MSR_CORE_PERF_GLOBAL_CTRL(38f), value 1000f000000ff //Re-enable global
> counter
This is unreadable garbage, please don't wrap trace output.
next prev parent reply other threads:[~2020-01-17 8:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-16 18:31 [RESEND PATCH] perf/x86/intel: Fix inaccurate period in context switch for auto-reload kan.liang
2020-01-17 8:58 ` Peter Zijlstra [this message]
2020-01-17 15:13 ` Liang, Kan
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=20200117085823.GV2827@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=ak@linux.intel.com \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.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