Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1457755
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] perf: sched out groups atomically |
| Date | 2016-08-08 14:20 +0200 |
| Message-ID | <s3RHb-1ii-17@gated-at.bofh.it> (permalink) |
| References | <rZebn-4SB-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Jul 26, 2016 at 06:12:21PM +0100, Mark Rutland wrote:
> Groups of events are supposed to be scheduled atomically, such that it
> is possible to derive meaningful ratios between their values.
>
> We take great pains to achieve this when scheduling event groups to a
> PMU in group_sched_in(), calling {start,commit}_txn() (which fall back
> to perf_pmu_{disable,enable}() if necessary) to provide this guarantee.
> However we don't mirror this in group_sched_out(), and in some cases
> events will not be scheduled out atomically.
>
> For example, if we disable an event group with PERF_EVENT_IOC_DISABLE,
> we'll cross-call __perf_event_disable() for the group leader, and will
> call group_sched_out() without having first disabled the relevant PMU.
> We will disable/enable the PMU around each pmu->del() call, but between
> each call the PMU will be enabled and events may count.
>
> Avoid this by explicitly disabling and enabling the PMU around event
> removal in group_sched_out(), mirroring what we do in group_sched_in().
Thanks!
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] perf: sched out groups atomically Mark Rutland <mark.rutland@arm.com> - 2016-07-26 19:20 +0200 Re: [PATCH] perf: sched out groups atomically Peter Zijlstra <peterz@infradead.org> - 2016-08-08 14:20 +0200 [tip:perf/core] perf/core: Sched out groups atomically tip-bot for Mark Rutland <tipbot@zytor.com> - 2016-08-10 21:50 +0200
csiph-web