All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Chao Peng <chao.p.peng@linux.intel.com>
Cc: keir@xen.org, Ian.Campbell@citrix.com,
	stefano.stabellini@eu.citrix.com, George.Dunlap@eu.citrix.com,
	andrew.cooper3@citrix.com, Ian.Jackson@eu.citrix.com,
	xen-devel@lists.xen.org, dgdegra@tycho.nsa.gov
Subject: Re: [PATCH v14 04/10] x86: detect and initialize Platform QoS Monitoring feature
Date: Tue, 02 Sep 2014 10:30:24 +0100	[thread overview]
Message-ID: <5405AA50020000780002FC63@mail.emea.novell.com> (raw)
In-Reply-To: <20140902090544.GD15872@pengc-linux>

>>> On 02.09.14 at 11:05, <chao.p.peng@linux.intel.com> wrote:
> On Mon, Sep 01, 2014 at 12:38:20PM +0100, Jan Beulich wrote:
>> >>> On 28.08.14 at 09:43, <chao.p.peng@linux.intel.com> wrote:
>> > +static void __init parse_pqos_param(char *s)
>> > +{
>> > +    char *ss, *val_str;
>> > +    int val;
>> > +
>> > +    do {
>> > +        ss = strchr(s, ',');
>> > +        if ( ss )
>> > +            *ss = '\0';
>> > +
>> > +        val = parse_bool(s);
>> > +        if ( val >= 0 )
>> > +            opt_pqos = val;
>> > +        else
>> > +        {
>> > +            val_str = strchr(s, ':');
>> > +            if ( val_str )
>> > +                *val_str++ = '\0';
>> > +
>> > +            if ( val_str && !strcmp(s, "pqos_monitor") &&
>> > +                 (val = parse_bool(val_str)) >= 0 )
>> > +                opt_pqos_monitor = val;
>> > +            else if ( val_str && !strcmp(s, "rmid_max") )
>> > +                opt_rmid_max = simple_strtoul(val_str, NULL, 0);
>> 
>> Shouldn't both of these imply opt_pqos = 1, so the user can avoid
>> redundancy like "pqos=yes,pqos_monitor:yes"? I'd even think
>> "pqos=pqos_monitor" should be sufficient to enable PQoS and the
>> monitoring.
> Another sub-option pqos_mbm(memory bandwith monitor) will be added
> in the future, which can coexist with pqos_monitor. So we want both can
> be turn on/off independently. While I agree with you that to keep things
> simple. How about this: pqos=pqos_monitor|pqos_mbm,rmid_max=* ?

Yes - all the extra "yes" or "no" should be accepted, but not required.

>> > +    if ( pqosm->qm_features & QOS_MONITOR_TYPE_L3 )
>> > +    {
>> > +        cpuid_count(0xf, 1, &eax, &ebx, &ecx, &edx);
>> > +        pqosm->l3m.upscaling_factor = ebx;
>> > +        pqosm->l3m.rmid_max = ecx;
>> > +        pqosm->l3m.l3_features = edx;
>> > +    }
>> > +
>> > +    pqosm->rmid_max = min(rmid_max, pqosm->l3m.rmid_max);
>> > +    pqosm->rmid_to_dom = xmalloc_array(domid_t, pqosm->rmid_max + 1);
>> 
>> ... this is what isn't going to do well.
> Nomally the rmid_max comes from hardware should not have chance to
> degenerate to 0xffffffff, do you mean we protect it with rmid_mask?

Then simply BUG_ON() rather then silently doing the wrong thing?

Jan

  reply	other threads:[~2014-09-02  9:30 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-28  7:43 [PATCH v14 00/10] enable Cache QoS Monitoring (CQM) feature Chao Peng
2014-08-28  7:43 ` [PATCH v14 01/10] x86: add generic resource (e.g. MSR) access hypercall Chao Peng
2014-08-29 15:40   ` Jan Beulich
2014-09-02  8:33     ` Chao Peng
2014-09-02  8:52       ` Jan Beulich
2014-09-02 10:04         ` Chao Peng
2014-09-02 10:24           ` Jan Beulich
2014-08-28  7:43 ` [PATCH v14 02/10] xsm: add resource operation related xsm policy Chao Peng
2014-08-29 18:55   ` Daniel De Graaf
2014-08-28  7:43 ` [PATCH v14 03/10] tools: provide interface for generic resource access Chao Peng
2014-08-28  7:43 ` [PATCH v14 04/10] x86: detect and initialize Platform QoS Monitoring feature Chao Peng
2014-08-28 10:52   ` Andrew Cooper
2014-09-02  8:40     ` Chao Peng
2014-09-01 11:38   ` Jan Beulich
2014-09-02  9:05     ` Chao Peng
2014-09-02  9:30       ` Jan Beulich [this message]
2014-08-28  7:43 ` [PATCH v14 05/10] x86: dynamically attach/detach QoS monitoring service for a guest Chao Peng
2014-09-01 11:39   ` Jan Beulich
2014-08-28  7:43 ` [PATCH v14 06/10] x86: collect global QoS monitoring information Chao Peng
2014-09-01 11:44   ` Jan Beulich
2014-08-28  7:43 ` [PATCH v14 07/10] x86: enable QoS monitoring for each domain RMID Chao Peng
2014-09-01 11:49   ` Jan Beulich
2014-08-28  7:43 ` [PATCH v14 08/10] x86: add QoS monitoring related MSRs in allowed list Chao Peng
2014-08-28  7:43 ` [PATCH v14 09/10] xsm: add platform QoS related xsm policies Chao Peng
2014-08-28  7:43 ` [PATCH v14 10/10] tools: CMDs and APIs for Platform QoS Monitoring Chao Peng

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=5405AA50020000780002FC63@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=chao.p.peng@linux.intel.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.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.