DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] About pmu cycle counter usage in armv8
@ 2017-12-11  5:38 Jia He
  2017-12-11  5:59 ` Jerin Jacob
  0 siblings, 1 reply; 4+ messages in thread
From: Jia He @ 2017-12-11  5:38 UTC (permalink / raw)
  To: Jerin Jacob, dev

Hi Jerin

In [1], I met a pmu cycle counter problem (all return value is 0) 
occasionally.

And then I submited a patch to kernel maillist, but was rejected by 
maintainer at last [2].

He said:

"We only intend for the in-kernel perf infrastructure to access

pmccntr_el0; nothing else should touch it."

So maybe it is not proper for dpdk to use pmu cycle counter?

[1] http://dpdk.org/ml/archives/dev/2017-November/080998.html

[2]https://lkml.org/lkml/2017/11/16/22

-- 
Cheers,
Jia

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] About pmu cycle counter usage in armv8
  2017-12-11  5:38 [dpdk-dev] About pmu cycle counter usage in armv8 Jia He
@ 2017-12-11  5:59 ` Jerin Jacob
  2017-12-11  6:23   ` Jia He
  0 siblings, 1 reply; 4+ messages in thread
From: Jerin Jacob @ 2017-12-11  5:59 UTC (permalink / raw)
  To: Jia He; +Cc: dev

-----Original Message-----
> Date: Mon, 11 Dec 2017 13:38:25 +0800
> From: Jia He <hejianet@gmail.com>
> To: Jerin Jacob <jerin.jacob@caviumnetworks.com>, "dev@dpdk.org"
>  <dev@dpdk.org>
> Subject: About pmu cycle counter usage in armv8
> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101
>  Thunderbird/52.5.0
> 
> Hi Jerin
> 
> In [1], I met a pmu cycle counter problem (all return value is 0)
> occasionally.
> 
> And then I submited a patch to kernel maillist, but was rejected by
> maintainer at last [2].
> 
> He said:
> 
> "We only intend for the in-kernel perf infrastructure to access
> 
> pmccntr_el0; nothing else should touch it."

Yes. That's the reason why
1) A warning added in documentation.
http://dpdk.org/doc/guides/prog_guide/profile_app.html
See at last
"
The PMU based scheme is useful for high accuracy performance profiling
with rte_rdtsc(). However, this method can not be used in conjunction
with Linux userspace profiling tools like perf as this scheme alters the
PMU registers state.
"
2) By default it is disabled and not need for production systems.
Needed only for performance debugging.

> 
> So maybe it is not proper for dpdk to use pmu cycle counter?

But, There is no alternative in arm64 to get high resolution counter in
user space(in performance effective way)

> 
> [1] http://dpdk.org/ml/archives/dev/2017-November/080998.html
> 
> [2]https://lkml.org/lkml/2017/11/16/22
> 
> -- 
> Cheers,
> Jia
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] About pmu cycle counter usage in armv8
  2017-12-11  5:59 ` Jerin Jacob
@ 2017-12-11  6:23   ` Jia He
  2017-12-11  6:32     ` Jerin Jacob
  0 siblings, 1 reply; 4+ messages in thread
From: Jia He @ 2017-12-11  6:23 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dev

Hi Jerin

Ok

And I wonder why you haven't met such problem (all rd_tsc() is 0)in your 
test platform?

Did you use an old kernel (older than v4.5-rc1)?

root@aw-host:~/linux# git describe da4e4f18afe0
v4.5-rc1-8-gda4e4f1

Maybe you need to give a warning that, the usage of High-resolution 
cycle counter is not
correct if the kernel version is newer than v4.5-rc1-8-gda4e4f1?

Cheers,
Jia
On 12/11/2017 1:59 PM, Jerin Jacob Wrote:
> -----Original Message-----
>> Date: Mon, 11 Dec 2017 13:38:25 +0800
>> From: Jia He <hejianet@gmail.com>
>> To: Jerin Jacob <jerin.jacob@caviumnetworks.com>, "dev@dpdk.org"
>>   <dev@dpdk.org>
>> Subject: About pmu cycle counter usage in armv8
>> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101
>>   Thunderbird/52.5.0
>>
>> Hi Jerin
>>
>> In [1], I met a pmu cycle counter problem (all return value is 0)
>> occasionally.
>>
>> And then I submited a patch to kernel maillist, but was rejected by
>> maintainer at last [2].
>>
>> He said:
>>
>> "We only intend for the in-kernel perf infrastructure to access
>>
>> pmccntr_el0; nothing else should touch it."
> Yes. That's the reason why
> 1) A warning added in documentation.
> http://dpdk.org/doc/guides/prog_guide/profile_app.html
> See at last
> "
> The PMU based scheme is useful for high accuracy performance profiling
> with rte_rdtsc(). However, this method can not be used in conjunction
> with Linux userspace profiling tools like perf as this scheme alters the
> PMU registers state.
> "
> 2) By default it is disabled and not need for production systems.
> Needed only for performance debugging.
>
>> So maybe it is not proper for dpdk to use pmu cycle counter?
> But, There is no alternative in arm64 to get high resolution counter in
> user space(in performance effective way)
>
>> [1] http://dpdk.org/ml/archives/dev/2017-November/080998.html
>>
>> [2]https://lkml.org/lkml/2017/11/16/22
>>
>> -- 
>> Cheers,
>> Jia
>>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] About pmu cycle counter usage in armv8
  2017-12-11  6:23   ` Jia He
@ 2017-12-11  6:32     ` Jerin Jacob
  0 siblings, 0 replies; 4+ messages in thread
From: Jerin Jacob @ 2017-12-11  6:32 UTC (permalink / raw)
  To: Jia He; +Cc: dev

-----Original Message-----
> Date: Mon, 11 Dec 2017 14:23:54 +0800
> From: Jia He <hejianet@gmail.com>
> To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> Cc: "dev@dpdk.org" <dev@dpdk.org>
> Subject: Re: About pmu cycle counter usage in armv8
> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101
>  Thunderbird/52.5.0
> 
> Hi Jerin

Hi Jia.

> 
> Ok
> 
> And I wonder why you haven't met such problem (all rd_tsc() is 0)in your
> test platform?
> 
> Did you use an old kernel (older than v4.5-rc1)?

I am using 4.9 kernel base.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-12-11  6:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-11  5:38 [dpdk-dev] About pmu cycle counter usage in armv8 Jia He
2017-12-11  5:59 ` Jerin Jacob
2017-12-11  6:23   ` Jia He
2017-12-11  6:32     ` Jerin Jacob

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).