linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: Joe Perches <joe@perches.com>,
	peterz@infradead.org, mingo@redhat.com, acme@kernel.org
Cc: linux-pm@vger.kernel.org, mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com, jolsa@redhat.com,
	namhyung@kernel.org, linux-kernel@vger.kernel.org,
	kan.liang@linux.intel.com, len.brown@intel.com,
	rafael@kernel.org
Subject: Re: [PATCH v2 2/3] perf/x86/rapl: Support multiple rapl unit quirks
Date: Wed, 12 Aug 2020 11:29:06 +0800	[thread overview]
Message-ID: <d7a19f05497b4137bacd639e576b7166e4a19842.camel@intel.com> (raw)
In-Reply-To: <445d4b9039daca40a4d937959a0bc48ffe347f7f.camel@perches.com>

Hi,

Thanks for reviewing.

On Tue, 2020-08-11 at 11:19 -0700, Joe Perches wrote:
> On Tue, 2020-08-11 at 23:31 +0800, Zhang Rui wrote:
> > There will be more platforms with different fixed energy units.
> > Enhance the code to support different rapl unit quirks for
> > different
> > platforms.
> 
> This seems like one quirk per platform.
> 
> Should multiple quirks on individual platforms be supported?
> 
enum rapl_unit_quirk is just used as a flag.
multiple quirks can be deployed with the same flag, just like what I
did in patch 3/3.
Also different platforms can either have different flags or share the
same flag.

thanks,
rui

> > diff --git a/arch/x86/events/rapl.c b/arch/x86/events/rapl.c
> 
> []
> > @@ -130,11 +130,16 @@ struct rapl_pmus {
> >  	struct rapl_pmu		*pmus[];
> >  };
> >  
> > +enum rapl_unit_quirk {
> > +	RAPL_UNIT_QUIRK_NONE,
> > +	RAPL_UNIT_QUIRK_INTEL_HSW,
> > +};
> > +
> >  struct rapl_model {
> >  	struct perf_msr *rapl_msrs;
> >  	unsigned long	events;
> >  	unsigned int	msr_power_unit;
> > -	bool		apply_quirk;
> > +	enum rapl_unit_quirk	unit_quirk;
> >  };
> 
> 


  reply	other threads:[~2020-08-12  3:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11 15:31 [PATCH v2 0/3] perf/x86/rapl: Add Intel SapphireRapids support Zhang Rui
2020-08-11 15:31 ` [PATCH v2 1/3] perf/x86/rapl: Fix missing psys sysfs attributes Zhang Rui
2020-08-14 15:23   ` [tip: perf/urgent] " tip-bot2 for Zhang Rui
2020-08-11 15:31 ` [PATCH v2 2/3] perf/x86/rapl: Support multiple rapl unit quirks Zhang Rui
2020-08-11 18:19   ` Joe Perches
2020-08-12  3:29     ` Zhang Rui [this message]
2020-08-12  3:51       ` Joe Perches
2020-08-14 15:23   ` [tip: perf/urgent] perf/x86/rapl: Support multiple RAPL " tip-bot2 for Zhang Rui
2020-08-11 15:31 ` [PATCH v2 3/3] perf/x86/rapl: Add support for Intel SPR platform Zhang Rui
2020-08-14 15:23   ` [tip: perf/urgent] " tip-bot2 for Zhang Rui

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=d7a19f05497b4137bacd639e576b7166e4a19842.camel@intel.com \
    --to=rui.zhang@intel.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=joe@perches.com \
    --cc=jolsa@redhat.com \
    --cc=kan.liang@linux.intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rafael@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 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).