From: zhangzhiqiang.zhang@huawei.com (zhangzhiqiang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: armv7: perf: fix armv7 ref-cycles error
Date: Thu, 9 Oct 2014 15:13:00 +0800 [thread overview]
Message-ID: <5436357C.3020300@huawei.com> (raw)
In-Reply-To: <20141009034147.GC19906@kroah.com>
On 2014/10/9 11:41, gregkh at linuxfoundation.org wrote:
> On Thu, Oct 09, 2014 at 11:07:04AM +0800, zhangzhiqiang wrote:
>> On 2014/10/8 21:38, Will Deacon wrote:
>>> On Wed, Oct 08, 2014 at 02:31:47PM +0100, gregkh at linuxfoundation.org wrote:
>>>> On Wed, Oct 08, 2014 at 10:17:41AM +0100, Will Deacon wrote:
>>>>> On Wed, Oct 08, 2014 at 04:06:12AM +0100, zhangzhiqiang wrote:
>>>>>> hi all,
>>>>>> ----------------------------------------
>>>>>>
>>>>>> ref-cycles event is specially to Intel core, but can still used in arm architecture
>>>>>> with the wrong return value with 3.10 stable. for instance:
>>>>>>
>>>>>> perf stat -e ref-cycles sleep 1
>>>>>>
>>>>>> Performance counter stats for 'sleep 1':
>>>>>>
>>>>>> 0 ref-cycles
>>>>>>
>>>>>> 1.002381916 seconds time elapsed
>>>>>>
>>>>>> this patch fix the bug and make it return NOT SUPPORTED
>>>>>> distinctly.
>>>>>>
>>>>>> In upstream this bug has been fixed by other way(not primary for the bug), which changes more than one file
>>>>>> and more than 1000 lines. the primary commit is 6b7658ec8a100b608e59e3cde353434db51f5be0.
>>>>>> besides we can not simply cherry-pick.
>>>>>
>>>>> I thought I saw Greg pick this up the other day?
>>>>
>>>> Yes, it's in 3.16.4, did I do something wrong by accepting it?
>>>
>>> Nah, it's a trivial patch that I struggle to get excited about. I'm just not
>>> sure why it's being sent again, after you already accepted it.
>>
>> Yes, it's in 3.16.4, in my opinion 3.10 need it too, can we put it into 3.10 or
>> do we have the plan?
>
> Does it apply to 3.10-stable? Did you test it there and see if it
> resolves your issue?
I have tested in 3.10.56, the bug is still existing and the patch is apply to 3.10-stable.
Follow is the result without/with this patch based on 3.10.56.
3.10.56 without the patch:
bash-4.2# perf stat -e ref-cycles sleep 1
Performance counter stats for 'sleep 1':
0 ref-cycles
1.002461500 seconds time elapsed
3.10.56 with the patch:
bash-4.2# perf stat -e ref-cycles sleep 1
Performance counter stats for 'sleep 1':
<not supported> ref-cycles
1.002385243 seconds time elapsed
Best wishes,
zhangzhiqiang
WARNING: multiple messages have this Message-ID (diff)
From: zhangzhiqiang <zhangzhiqiang.zhang@huawei.com>
To: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: Will Deacon <will.deacon@arm.com>,
Mark Rutland <Mark.Rutland@arm.com>,
"cov@codeaurora.org" <cov@codeaurora.org>,
"lizefan@huawei.com" <lizefan@huawei.com>,
"wangnan0@huawei.com" <wangnan0@huawei.com>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] arm: armv7: perf: fix armv7 ref-cycles error
Date: Thu, 9 Oct 2014 15:13:00 +0800 [thread overview]
Message-ID: <5436357C.3020300@huawei.com> (raw)
In-Reply-To: <20141009034147.GC19906@kroah.com>
On 2014/10/9 11:41, gregkh@linuxfoundation.org wrote:
> On Thu, Oct 09, 2014 at 11:07:04AM +0800, zhangzhiqiang wrote:
>> On 2014/10/8 21:38, Will Deacon wrote:
>>> On Wed, Oct 08, 2014 at 02:31:47PM +0100, gregkh@linuxfoundation.org wrote:
>>>> On Wed, Oct 08, 2014 at 10:17:41AM +0100, Will Deacon wrote:
>>>>> On Wed, Oct 08, 2014 at 04:06:12AM +0100, zhangzhiqiang wrote:
>>>>>> hi all,
>>>>>> ----------------------------------------
>>>>>>
>>>>>> ref-cycles event is specially to Intel core, but can still used in arm architecture
>>>>>> with the wrong return value with 3.10 stable. for instance:
>>>>>>
>>>>>> perf stat -e ref-cycles sleep 1
>>>>>>
>>>>>> Performance counter stats for 'sleep 1':
>>>>>>
>>>>>> 0 ref-cycles
>>>>>>
>>>>>> 1.002381916 seconds time elapsed
>>>>>>
>>>>>> this patch fix the bug and make it return NOT SUPPORTED
>>>>>> distinctly.
>>>>>>
>>>>>> In upstream this bug has been fixed by other way(not primary for the bug), which changes more than one file
>>>>>> and more than 1000 lines. the primary commit is 6b7658ec8a100b608e59e3cde353434db51f5be0.
>>>>>> besides we can not simply cherry-pick.
>>>>>
>>>>> I thought I saw Greg pick this up the other day?
>>>>
>>>> Yes, it's in 3.16.4, did I do something wrong by accepting it?
>>>
>>> Nah, it's a trivial patch that I struggle to get excited about. I'm just not
>>> sure why it's being sent again, after you already accepted it.
>>
>> Yes, it's in 3.16.4, in my opinion 3.10 need it too, can we put it into 3.10 or
>> do we have the plan?
>
> Does it apply to 3.10-stable? Did you test it there and see if it
> resolves your issue?
I have tested in 3.10.56, the bug is still existing and the patch is apply to 3.10-stable.
Follow is the result without/with this patch based on 3.10.56.
3.10.56 without the patch:
bash-4.2# perf stat -e ref-cycles sleep 1
Performance counter stats for 'sleep 1':
0 ref-cycles
1.002461500 seconds time elapsed
3.10.56 with the patch:
bash-4.2# perf stat -e ref-cycles sleep 1
Performance counter stats for 'sleep 1':
<not supported> ref-cycles
1.002385243 seconds time elapsed
Best wishes,
zhangzhiqiang
next prev parent reply other threads:[~2014-10-09 7:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 3:06 [PATCH] arm: armv7: perf: fix armv7 ref-cycles error zhangzhiqiang
2014-10-08 3:06 ` zhangzhiqiang
2014-10-08 9:17 ` Will Deacon
2014-10-08 9:17 ` Will Deacon
2014-10-08 13:31 ` gregkh at linuxfoundation.org
2014-10-08 13:31 ` gregkh
2014-10-08 13:38 ` Will Deacon
2014-10-08 13:38 ` Will Deacon
2014-10-09 3:07 ` zhangzhiqiang
2014-10-09 3:07 ` zhangzhiqiang
2014-10-09 3:41 ` gregkh at linuxfoundation.org
2014-10-09 3:41 ` gregkh
2014-10-09 7:13 ` zhangzhiqiang [this message]
2014-10-09 7:13 ` zhangzhiqiang
2014-10-09 13:51 ` gregkh at linuxfoundation.org
2014-10-09 13:51 ` gregkh
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=5436357C.3020300@huawei.com \
--to=zhangzhiqiang.zhang@huawei.com \
--cc=linux-arm-kernel@lists.infradead.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.