Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1608360
| From | Mark Rutland <mark.rutland@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v6 08/11] drivers: perf: hisi: use poll method to avoid L3C counter overflow |
| Date | 2017-03-24 13:00 +0100 |
| Message-ID | <tow2S-10z-7@gated-at.bofh.it> (permalink) |
| References | <tjmdQ-87B-19@gated-at.bofh.it> <tnvBU-6kG-17@gated-at.bofh.it> <torcR-5YR-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Mar 24, 2017 at 12:13:18PM +0530, Anurup M wrote:
> On Tuesday 21 March 2017 10:46 PM, Mark Rutland wrote:
> >On Fri, Mar 10, 2017 at 01:28:45AM -0500, Anurup M wrote:
> >>+/* The counter overflow IRQ is not supported for some PMUs
> >>+ * use hrtimer to periodically poll and avoid overflow
> >>+ */
> >>+static enum hrtimer_restart hisi_hrtimer_callback(struct hrtimer *hrtimer)
> >>+{
> >>+ struct hisi_pmu *hisi_pmu = container_of(hrtimer,
> >>+ struct hisi_pmu, hrtimer);
> >>+ struct perf_event *event;
> >>+ struct hw_perf_event *hwc;
> >>+ unsigned long flags;
> >>+
> >>+ /* Return if no active events */
> >>+ if (!hisi_pmu->num_active)
> >>+ return HRTIMER_NORESTART;
> >>+
> >>+ local_irq_save(flags);
> >>+
> >>+ /* Update event count for each active event */
> >>+ list_for_each_entry(event, &hisi_pmu->active_list, active_entry) {
> >>+ hwc = &event->hw;
> >>+ /* Read hardware counter and update the Perf event counter */
> >>+ hisi_pmu->ops->event_update(event, hwc, GET_CNTR_IDX(hwc));
> >>+ }
> >How do we ensure that we don't take the interrupt in the middle of a
> >sequence of accesses to the HW?
>
> The L3 cache and MN PMU does not use the overflow IRQ and it does
> not occur here
> as the interrupt Mask register is by default masked in hardware.
I was referring to the timer interrupt which backs the hrtimer.
i.e. how do we guarantee that hisi_hrtimer_callback() is not called
while we are in the middle of a RMW sequence? Are interrupts disabled
for all of those seqeunces?
Thanks,
Mark.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v6 08/11] drivers: perf: hisi: use poll method to avoid L3C counter overflow Mark Rutland <mark.rutland@arm.com> - 2017-03-21 18:20 +0100
Re: [PATCH v6 08/11] drivers: perf: hisi: use poll method to avoid L3C counter overflow Anurup M <anurupvasu@gmail.com> - 2017-03-24 07:50 +0100
Re: [PATCH v6 08/11] drivers: perf: hisi: use poll method to avoid L3C counter overflow Mark Rutland <mark.rutland@arm.com> - 2017-03-24 13:00 +0100
Re: [PATCH v6 08/11] drivers: perf: hisi: use poll method to avoid L3C counter overflow Anurup M <anurupvasu@gmail.com> - 2017-03-27 08:40 +0200
csiph-web