Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1361919
| From | Matt Fleming <matt@codeblueprint.co.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [tip:perf/urgent] perf/x86/mbm: Implement RMID recycling |
| Date | 2016-03-21 16:10 +0100 |
| Message-ID | <rf9CV-7tl-13@gated-at.bofh.it> (permalink) |
| References | <rbilr-5Ng-11@gated-at.bofh.it> <rf4MW-3JE-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, 21 Mar, at 02:53:04AM, tip-bot for Vikas Shivappa wrote:
> @@ -489,6 +496,22 @@ static u32 intel_cqm_xchg_rmid(struct perf_event *group, u32 rmid)
>
> raw_spin_unlock_irq(&cache_lock);
>
> + /*
> + * If the allocation is for mbm, init the mbm stats.
> + * Need to check if each event in the group is mbm event
> + * because there could be multiple type of events in the same group.
> + */
> + if (__rmid_valid(rmid)) {
> + event = group;
> + if (is_mbm_event(event->attr.config))
> + init_mbm_sample(rmid, event->attr.config);
> +
> + list_for_each_entry(event, head, hw.cqm_group_entry) {
> + if (is_mbm_event(event->attr.config))
> + init_mbm_sample(rmid, event->attr.config);
> + }
> + }
> +
> return old_rmid;
> }
>
You're calling init_mbm_sample() without holding cache_lock. Won't
this potentially trash the existing value in MSR_IA32_QM_EVTSEL, if
say, we're reading the counter at the same time as the recycling
worker is running?
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[tip:perf/urgent] perf/x86/mbm: Implement RMID recycling tip-bot for Vikas Shivappa <tipbot@zytor.com> - 2016-03-21 11:00 +0100
Re: [tip:perf/urgent] perf/x86/mbm: Implement RMID recycling Matt Fleming <matt@codeblueprint.co.uk> - 2016-03-21 16:10 +0100
Re: [tip:perf/urgent] perf/x86/mbm: Implement RMID recycling Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2016-03-21 20:50 +0100
Re: [tip:perf/urgent] perf/x86/mbm: Implement RMID recycling Matt Fleming <matt@codeblueprint.co.uk> - 2016-03-23 22:00 +0100
csiph-web