From: Don Zickus <dzickus@redhat.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: x86@kernel.org, LKML <linux-kernel@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Robert Richter <robert.richter@amd.com>,
Maciej Rutecki <maciej.rutecki@gmail.com>,
George Spelvin <linux@horizon.com>,
Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH 3/4] perf, nmi: Move LVT un-masking into irq handlers
Date: Mon, 25 Apr 2011 09:39:54 -0400 [thread overview]
Message-ID: <20110425133954.GA20887@redhat.com> (raw)
In-Reply-To: <20110422082636.GC24011@elte.hu>
On Fri, Apr 22, 2011 at 10:26:36AM +0200, Ingo Molnar wrote:
>
> * Don Zickus <dzickus@redhat.com> wrote:
>
> > --- a/arch/x86/kernel/cpu/perf_event.c
> > +++ b/arch/x86/kernel/cpu/perf_event.c
> > @@ -1284,6 +1284,9 @@ static int x86_pmu_handle_irq(struct pt_regs *regs)
> >
> > cpuc = &__get_cpu_var(cpu_hw_events);
> >
> > + /* chipsets have their own quirks when to unmask */
> > + apic_write(APIC_LVTPC, APIC_DM_NMI);
> > +
>
> What sense does this comment make in this place?
>
> Yes, chipsets have their own quirks - but the generic handler is not one of
> them. So a more appropriate comment would be to point out why we want to unmask
> there - before PMU handling or after it, etc.
Yup. I rework that.
>
> Like the P4 quirk is documented a bit better:
>
> > + /*
> > + * P4 quirks:
> > + * - An overflown perfctr will assert its interrupt
> > + * until the OVF flag in its CCCR is cleared.
> > + * - LVTPC is masked on interrupt and must be
> > + * unmasked by the LVTPC handler.
> > + */
> > + apic_write(APIC_LVTPC, APIC_DM_NMI);
>
> (btw., there's whitespace damage above as well.)
>
> Furthermore, the P4 comment should *explain* the quirk coherently, not just
> list random facts. What happens, why, where, and why do we unmask the LVTPC in
> that spot.
Yeah, I copied that from the old watchdog code. I'll revise that too and
repost.
Cheers,
Don
next prev parent reply other threads:[~2011-04-25 13:40 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-21 15:03 [PATCH 0/4] perf, x86: collection of pentium 4 fixes Don Zickus
2011-04-21 15:03 ` [PATCH 1/4] perf, x86: P4 PMU -- Use perf_sample_data_init helper Don Zickus
2011-04-22 8:20 ` Ingo Molnar
2011-04-22 8:35 ` Cyrill Gorcunov
2011-04-22 12:18 ` [tip:perf/core] " tip-bot for Cyrill Gorcunov
2011-04-21 15:03 ` [PATCH 2/4] perf, x86: P4 PMU - Don't forget to clear cpuc->active_mask on overflow Don Zickus
2011-04-22 12:19 ` [tip:perf/urgent] " tip-bot for Cyrill Gorcunov
2011-04-21 15:03 ` [PATCH 3/4] perf, nmi: Move LVT un-masking into irq handlers Don Zickus
2011-04-22 8:26 ` Ingo Molnar
2011-04-25 13:39 ` Don Zickus [this message]
2011-04-25 14:15 ` Cyrill Gorcunov
[not found] ` <BANLkTi=t7bZ0sFRvUt=a=_54fhXtccPYnQ@mail.gmail.com>
2011-04-25 14:28 ` Cyrill Gorcunov
2011-04-25 14:50 ` Don Zickus
2011-04-25 14:51 ` Cyrill Gorcunov
2011-04-21 15:03 ` [PATCH 4/4] perf, x86: Add PERF_COUNT_HW_NMI_WATCHDOG event Don Zickus
2011-04-22 8:18 ` Ingo Molnar
2011-04-22 8:43 ` Cyrill Gorcunov
2011-04-22 8:54 ` Peter Zijlstra
2011-04-22 9:24 ` Cyrill Gorcunov
2011-04-22 9:45 ` Peter Zijlstra
2011-04-22 10:02 ` Cyrill Gorcunov
2011-04-22 15:15 ` Cyrill Gorcunov
2011-04-25 13:41 ` Don Zickus
2011-04-25 14:05 ` Cyrill Gorcunov
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=20110425133954.GA20887@redhat.com \
--to=dzickus@redhat.com \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@horizon.com \
--cc=maciej.rutecki@gmail.com \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=robert.richter@amd.com \
--cc=x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.