All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>, Brendan Gregg <bgregg@netflix.com>
Cc: xen-devel@lists.xen.org
Subject: Re: patch for restricted vPMU modes
Date: Mon, 23 Nov 2015 11:12:04 +0000	[thread overview]
Message-ID: <5652F484.9010201@citrix.com> (raw)
In-Reply-To: <565301D502000078000B7BC4@prv-mh.provo.novell.com>

On 23/11/15 11:08, Jan Beulich wrote:
>>>> On 21.11.15 at 06:32, <bgregg@netflix.com> wrote:
>> I've included the short patch below for Xen 4.6.0, which provides these
>> modes (it also fixes a minor copy-and-paste error with
>> core2_get_fixed_pmc_count(), which I believe was accessing the wrong
>> register). I am not a veteran Xen programmer, so please feel free to edit
>> or rewrite this patch. In case this email messes it up, it's also on:
>> https://github.com/brendangregg/Misc/blob/master/xen/xen-4.6.0-vpmu-filter.d 
>> iff
> Thanks for the contribution, but I'm sorry - this is not how things work.
> Unless someone else want to pick this up (and perhaps even then) the
> patch lacks proper attributes (like a Signed-off-by tag), should be
> against -unstable instead of any released version, and I don't think
> anyone's going to go grab it from a web page to apply (i.e. if you
> can't get your mail client to handle it properly when inlined, attach it
> in addition to inlining).
>
> See http://wiki.xenproject.org/wiki/Submitting_Xen_Project_Patches.
>
>> --- xen-4.6.0-clean/xen/arch/x86/cpu/vpmu_intel.c 2015-10-05
>> 07:33:39.000000000 -0700
>> +++ xen-4.6.0-brendan/xen/arch/x86/cpu/vpmu_intel.c 2015-11-20
>> 15:29:42.571781176 -0800
>> @@ -166,10 +166,10 @@
>>   */
>>  static int core2_get_fixed_pmc_count(void)
>>  {
>> -    u32 eax;
>> +    u32 edx;
>>
>> -    eax = cpuid_eax(0xa);
>> -    return MASK_EXTR(eax, PMU_FIXED_NR_MASK);
>> +    edx = cpuid_edx(0xa);
>> +    return MASK_EXTR(edx, PMU_FIXED_NR_MASK);
>>  }
> Without going into much detail on the actual patch, this caught my
> eye: Either you're fixing a pretty blatant bug here, or this change
> just can't be right. In the former case, such a fix should be
> submitted as a separate patch.

Blatent bug.  The number of fixed function perf counters is bits 4:0 of edx.

~Andrew

  reply	other threads:[~2015-11-23 11:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-21  5:32 patch for restricted vPMU modes Brendan Gregg
2015-11-23 11:08 ` Jan Beulich
2015-11-23 11:12   ` Andrew Cooper [this message]
     [not found] <CAJN39ohu5fvs9rKowg5iaZPJeni+Xn2i+cPkbUgX++0GksgtDQ@mail.gmail.com>
2015-11-23 14:35 ` Boris Ostrovsky
2015-11-23 22:01   ` Brendan Gregg
2015-11-23 22:54     ` Boris Ostrovsky

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=5652F484.9010201@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=bgregg@netflix.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.