Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1580558
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] perf/x86/intel/pt: Fail event scheduling on conflict with VMX |
| Date | 2017-02-14 15:00 +0100 |
| Message-ID | <taLOa-2zE-7@gated-at.bofh.it> (permalink) |
| References | <taLl8-2pq-17@gated-at.bofh.it> <taLuO-2sF-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Feb 14, 2017 at 03:24:15PM +0200, Alexander Shishkin wrote:
> At the moment, if VMX operation prevents PT tracing, the PMU will
> silently return success to the event scheduling code, which will
> track its 'on' time, etc. Instead, report failure so that perf
> core knows this event is not actually on.
>
> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> Reported-by: Andi Kleen <ak@linux.intel.com>
> Fixes: 1c5ac21a0e ("perf/x86/intel/pt: Don't die on VMXON")
> ---
> arch/x86/events/intel/pt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c
> index d92a60ef08..9372fa4549 100644
> --- a/arch/x86/events/intel/pt.c
> +++ b/arch/x86/events/intel/pt.c
> @@ -1335,7 +1335,7 @@ static void pt_event_start(struct perf_event *event, int mode)
> struct pt_buffer *buf;
>
> if (READ_ONCE(pt->vmx_on))
> - return;
> + goto fail_stop;
>
> buf = perf_aux_output_begin(&pt->handle, event);
> if (!buf)
I'm not getting it; how does this matter to the time tracking in
event_sched_in() / event_sched_out() ?
That looks at event->state == PERF_EVENT_STATE*
This goto affects event->hw.state == PERF_HES_
The core assumes ->start() will _NOT_ fail.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] perf/x86/intel/pt: VMX related updates Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-02-14 14:30 +0100
[PATCH 2/2] perf/x86/intel/pt: Fail event creation if VMX operation is on Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-02-14 14:40 +0100
Re: [PATCH 2/2] perf/x86/intel/pt: Fail event creation if VMX operation is on Peter Zijlstra <peterz@infradead.org> - 2017-02-14 15:10 +0100
Re: [PATCH 2/2] perf/x86/intel/pt: Fail event creation if VMX operation is on Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-14 18:50 +0100
Re: [PATCH 2/2] perf/x86/intel/pt: Fail event creation if VMX operation is on Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-02-15 09:40 +0100
Re: [PATCH 2/2] perf/x86/intel/pt: Fail event creation if VMX operation is on Peter Zijlstra <peterz@infradead.org> - 2017-02-15 10:00 +0100
Re: [PATCH 2/2] perf/x86/intel/pt: Fail event creation if VMX operation is on Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-02-15 14:10 +0100
Re: [PATCH 2/2] perf/x86/intel/pt: Fail event creation if VMX operation is on Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-15 14:20 +0100
Re: [PATCH 2/2] perf/x86/intel/pt: Fail event creation if VMX operation is on Peter Zijlstra <peterz@infradead.org> - 2017-02-15 14:40 +0100
Re: [PATCH 2/2] perf/x86/intel/pt: Fail event creation if VMX operation is on Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-15 14:00 +0100
Re: [PATCH 2/2] perf/x86/intel/pt: Fail event creation if VMX operation is on Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-02-15 14:10 +0100
Re: [PATCH 2/2] perf/x86/intel/pt: Fail event creation if VMX operation is on Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-15 14:20 +0100
[PATCH 1/2] perf/x86/intel/pt: Fail event scheduling on conflict with VMX Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-02-14 14:40 +0100
Re: [PATCH 1/2] perf/x86/intel/pt: Fail event scheduling on conflict with VMX Peter Zijlstra <peterz@infradead.org> - 2017-02-14 15:00 +0100
Re: [PATCH 1/2] perf/x86/intel/pt: Fail event scheduling on conflict with VMX Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-02-14 17:20 +0100
Re: [PATCH 1/2] perf/x86/intel/pt: Fail event scheduling on conflict with VMX Peter Zijlstra <peterz@infradead.org> - 2017-02-14 17:30 +0100
Re: [PATCH 1/2] perf/x86/intel/pt: Fail event scheduling on conflict with VMX Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-02-14 18:30 +0100
Re: [PATCH 1/2] perf/x86/intel/pt: Fail event scheduling on conflict with VMX Peter Zijlstra <peterz@infradead.org> - 2017-02-14 19:40 +0100
Re: [PATCH 1/2] perf/x86/intel/pt: Fail event scheduling on conflict with VMX Peter Zijlstra <peterz@infradead.org> - 2017-02-14 20:50 +0100
Re: [PATCH 1/2] perf/x86/intel/pt: Fail event scheduling on conflict with VMX Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-02-15 09:20 +0100
Re: [PATCH 1/2] perf/x86/intel/pt: Fail event scheduling on conflict with VMX Peter Zijlstra <peterz@infradead.org> - 2017-02-15 10:00 +0100
csiph-web