All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Liang, Kan" <kan.liang@linux.intel.com>
To: Sasha Levin <sashal@kernel.org>
Cc: tglx@linutronix.de, peterz@infradead.org, mingo@redhat.com,
	linux-kernel@vger.kernel.org, ak@linux.intel.com,
	yao.jin@linux.intel.com, stable@vger.kernel.org
Subject: Re: [PATCH] perf/x86/intel/uncore: Fix client IMC events return huge result
Date: Fri, 16 Nov 2018 11:32:35 -0500	[thread overview]
Message-ID: <d40e2e0b-61fc-06fb-693b-132d94a2b149@linux.intel.com> (raw)
In-Reply-To: <20181116161235.GF1706@sasha-vm>



On 11/16/2018 11:12 AM, Sasha Levin wrote:
> On Fri, Nov 16, 2018 at 05:19:45AM -0800, kan.liang@linux.intel.com wrote:
>> From: Kan Liang <kan.liang@linux.intel.com>
>>
>> The client IMC bandwidth events return very huge result.
>>  perf stat -e uncore_imc/data_reads/ -e uncore_imc/data_writes/ -I
>> 10000 -a
>>  10.000117222 34,788.76 MiB uncore_imc/data_reads/
>>  10.000117222 8.26 MiB uncore_imc/data_writes/
>>  20.000374584 34,842.89 MiB uncore_imc/data_reads/
>>  20.000374584 10.45 MiB uncore_imc/data_writes/
>>  30.000633299 37,965.29 MiB uncore_imc/data_reads/
>>  30.000633299 323.62 MiB uncore_imc/data_writes/
>>  40.000891548 41,012.88 MiB uncore_imc/data_reads/
>>  40.000891548 6.98 MiB uncore_imc/data_writes/
>>  50.001142480 1,125,899,906,621,494.75 MiB uncore_imc/data_reads/
>>  50.001142480 6.97 MiB uncore_imc/data_writes/
>>
>> The client IMC events are freerunning counters. They still use the
>> old event encoding format (0x1 for data_read and 0x2 for data write).
>> The counter bit width is calculated by common code, which assume that
>> the standard encoding format is used for the freerunning counters.
>> Error bit width information is calculated.
>>
>> The event->attr.config, which directly from user space, should not be
>> used by the functions of freerunning counters.
>> For client IMC events, the attr.config needs to be converted to the
>> standard encoding format. The modified event config will be stored in
>> event->hw.config.
>> For other freerunning counters, the attr.config has the correct format.
>> Just save it in event->hw.config.
>> Using event->hw.config to replace event->attr.config for the functions
>> of freerunning counters.
>>
>> Fix: commit 9aae1780e7e8 ("perf/x86/intel/uncore: Clean up client IMC
>> uncore")
> 
> Please use a "fixes" (vs "fix") tag here, a few folks have automation
> around this. It should look something like this:
> 
>      Fixes: commit 9aae1780e7e8 ("perf/x86/intel/uncore: Clean up client 
> IMC uncore")
> 
> Also, if you intend for this to go in stable trees, please add a stable
> tag rather than just cc it to the stable mailing list. Something like
> this:
> 
>      Cc: stable@kernel.org
>

Thanks Sasha for the review. I have sent a V2 patch to address the 
format issue.

Thanks,
Kan

      reply	other threads:[~2018-11-16 16:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-16 13:19 [PATCH] perf/x86/intel/uncore: Fix client IMC events return huge result kan.liang
2018-11-16 16:12 ` Sasha Levin
2018-11-16 16:32   ` Liang, Kan [this message]

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=d40e2e0b-61fc-06fb-693b-132d94a2b149@linux.intel.com \
    --to=kan.liang@linux.intel.com \
    --cc=ak@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=yao.jin@linux.intel.com \
    /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.