LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Liang, Kan" <kan.liang@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: tglx@linutronix.de, acme@kernel.org, mingo@redhat.com,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	len.brown@intel.com, jolsa@redhat.com, namhyung@kernel.org,
	eranian@google.com, ak@linux.intel.com
Subject: Re: [PATCH 01/10] perf/x86/intel: Introduce a concept "domain" as the scope of counters
Date: Wed, 20 Feb 2019 09:36:49 -0500	[thread overview]
Message-ID: <9631a92f-5b24-26a6-e160-4e4c0b4697c1@linux.intel.com> (raw)
In-Reply-To: <20190220111226.GG32494@hirez.programming.kicks-ass.net>



On 2/20/2019 6:12 AM, Peter Zijlstra wrote:
> On Tue, Feb 19, 2019 at 12:00:02PM -0800, kan.liang@linux.intel.com wrote:
>> It's very useful to abstract several common topology related codes for
>> these modules to reduce the code redundancy.
> 
>>   3 files changed, 96 insertions(+), 1 deletion(-)
> 
> So you add 100 lines, so we can remove lines when we start to use this.
> 
> Except all 3 follow up patches that employ this, all add more lines
> still:

The previous implementation assumes that there is only one or two types 
of counters (per core or per package). The proposed solution breaks the 
assumption and can support more types of counters. The new 
infrastructure needs more lines. But with more and more types 
introduced, we can expect less lines in total with the proposed solution.

>   1 file changed, 184 insertions(+), 157 deletions(-)

This is cstate which supports two types of counters (per core and per 
package) now.

>   3 files changed, 164 insertions(+), 80 deletions(-)
>   1 file changed, 224 insertions(+), 82 deletions(-)
> 

They are uncore and rapl which only supports one type of counters (per 
package) now.

When there is only one type, the proposed solution has more lines.
But when there are two types, the proposed solution has similar number 
of lines as previous implementation.
In this trend, I expect that the proposed solution has less lines when 
there are three or more types.

With die introduced, there are at least two types of counters for rapl 
and uncore, and three types for cstate. In total, we should see less lines.

There may be more types of counters added later. In 8.9.1 Hierarchical 
Mapping of Shared Resources of SDM vol3A, it document 7 APIC_ID fields 
(cluster, package, die, tile, module, core and SMT). There are only 4 
types of counters for now.


Thanks,
Kan

  reply	other threads:[~2019-02-20 14:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19 20:00 [PATCH 00/10] perf: Multi-die/package support kan.liang
2019-02-19 20:00 ` [PATCH 01/10] perf/x86/intel: Introduce a concept "domain" as the scope of counters kan.liang
2019-02-20 11:12   ` Peter Zijlstra
2019-02-20 14:36     ` Liang, Kan [this message]
2019-03-05 20:32       ` Liang, Kan
2019-02-19 20:00 ` [PATCH 02/10] perf/x86/intel/cstate: Apply "domain" for cstate kan.liang
2019-02-19 20:00 ` [PATCH 03/10] perf/x86/intel/uncore: Apply "domain" for uncore kan.liang
2019-02-19 20:00 ` [PATCH 04/10] perf/x86/intel/rapl: Apply "domain" for RAPL kan.liang
2019-02-19 20:00 ` [PATCH 05/10] perf/x86/intel/domain: Add new domain type for die kan.liang
2019-02-19 20:00 ` [PATCH 06/10] perf/x86/intel/cstate: Support die scope counters on CLX-AP kan.liang
2019-02-19 20:00 ` [PATCH 07/10] perf/x86/intel/uncore: " kan.liang
2019-02-19 20:00 ` [PATCH 08/10] perf/x86/intel/rapl: " kan.liang
2019-02-19 20:00 ` [PATCH 09/10] perf header: Add die information in cpu topology kan.liang
2019-02-19 20:00 ` [PATCH 10/10] perf stat: Support per-die aggregation kan.liang
2019-02-20 10:15 ` [PATCH 00/10] perf: Multi-die/package support Peter Zijlstra
2019-02-20 12:46 ` Jiri Olsa
2019-02-20 13:24   ` Peter Zijlstra
2019-02-20 13:32     ` Jiri Olsa

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=9631a92f-5b24-26a6-e160-4e4c0b4697c1@linux.intel.com \
    --to=kan.liang@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --subject='Re: [PATCH 01/10] perf/x86/intel: Introduce a concept "domain" as the scope of counters' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).