mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: "Liang, Kan" <kan.liang@intel.com>
Cc: "peterz@infradead.org" <peterz@infradead.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"acme@kernel.org" <acme@kernel.org>,
	"eranian@google.com" <eranian@google.com>,
	"ak@linux.intel.com" <ak@linux.intel.com>
Subject: RE: [PATCH V3 1/5] perf/x86/intel/uncore: customized pmu event read for client IMC uncore
Date: Thu, 2 Nov 2017 15:16:29 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1711021513400.2090@nanos> (raw)
In-Reply-To: <alpine.DEB.2.20.1711021510060.2090@nanos>

On Thu, 2 Nov 2017, Thomas Gleixner wrote:
> On Thu, 2 Nov 2017, Liang, Kan wrote:
> > > On Thu, 2 Nov 2017, Thomas Gleixner wrote:
> > > > On Thu, 2 Nov 2017, Liang, Kan wrote:
> > > > > Patch 5/5 will clean up the client IMC uncore.
> > > > > Before that, we still need it to make client IMC uncore work.
> > > > >
> > > > > This patch isolates the >= case for client IMC uncore.
> > > >
> > > > Fair enough. A comment to that effect (even when removed later) would
> > > > have avoided that question.
> > > 
> > > Thinking more about it. The current code only supports the fixed one, right?
> > > So why would it deal with anything > FIXED?
> > > 
> > 
> > There are two free running counters in IMC.
> > To support the second one, the previous code implicitly do
> > UNCORE_PMC_IDX_FIXED + 1.
> > So it has to deal with > FIXED case.
> > 
> > 	case SNB_UNCORE_PCI_IMC_DATA_READS:
> > 		base = SNB_UNCORE_PCI_IMC_DATA_READS_BASE;
> > 		idx = UNCORE_PMC_IDX_FIXED;
> > 		break;
> > 	case SNB_UNCORE_PCI_IMC_DATA_WRITES:
> > 		base = SNB_UNCORE_PCI_IMC_DATA_WRITES_BASE;
> > 		idx = UNCORE_PMC_IDX_FIXED + 1;
> > 		break;
> > 	default:
> > 		return -EINVAL;
> 
> Fugly that is, but as its cleaned up later....

But then you have this in uncore_perf_event_update():
 
-       if (event->hw.idx >= UNCORE_PMC_IDX_FIXED)
+       if (event->hw.idx == UNCORE_PMC_IDX_FIXED)

So how is that supposed to work?

I think your patch order is wrong and breaks bisectability all over the
place as you fixup the UNCORE_PMC_IDX_FIXED + 1 hackery in 5/5.

Thanks,

	tglx

  reply	other threads:[~2017-11-02 14:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24 11:05 kan.liang
2017-10-24 11:05 ` [PATCH V3 2/5] perf/x86/intel/uncore: add infrastructure for free running counter kan.liang
2017-10-24 11:05 ` [PATCH V3 3/5] perf/x86/intel/uncore: SKX support for IIO " kan.liang
2017-10-24 11:05 ` [PATCH V3 4/5] perf/x86/intel/uncore: expose pmu counter operation functions kan.liang
2017-10-24 11:05 ` [PATCH V3 5/5] perf/x86/intel/uncore: clean up client IMC uncore kan.liang
2017-11-02 13:46 ` [PATCH V3 1/5] perf/x86/intel/uncore: customized pmu event read for " Thomas Gleixner
2017-11-02 13:51   ` Liang, Kan
2017-11-02 13:54     ` Thomas Gleixner
2017-11-02 13:59       ` Thomas Gleixner
2017-11-02 14:06         ` Liang, Kan
2017-11-02 14:11           ` Thomas Gleixner
2017-11-02 14:16             ` Thomas Gleixner [this message]
2017-11-02 14:27               ` Liang, Kan
2017-11-02 14:56                 ` Thomas Gleixner
2017-11-02 15:10                   ` Liang, Kan
2017-11-02 15:39                     ` Thomas Gleixner
2017-11-02 15:57                       ` Liang, Kan

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=alpine.DEB.2.20.1711021513400.2090@nanos \
    --to=tglx@linutronix.de \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=eranian@google.com \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®