[PATCH 00/17] coresight: next v4.12-rc4

Kim Phillips kim.phillips at arm.com
Thu Jun 15 07:22:46 PDT 2017


On Thu, 15 Jun 2017 09:41:22 +0100
Sudeep Holla <sudeep.holla at arm.com> wrote:

> On 15/06/17 04:34, Kim Phillips wrote:
> [...]
> > How does one tell whether writes to /dev/cpu_dma_latency are effective?
> > 
> Watch /sys/devices/system/cpu/cpu*/cpuidle/state*/{usage,time}, they
> shouldn't tick based on the value set to cpu_dma_latency.
> 
> E.g. a value of 0 should stop entering all the idle states.

I see all states following the same pattern whether 0 or not:

root at juno:~# cat show2.sh 
show()
{
	echo $1 > /dev/cpu_dma_latency
	echo === $1:
	cat /sys/devices/system/cpu/cpu2/cpuidle/state*/{usage,time}
	echo ---
	sleep 10
	cat /sys/devices/system/cpu/cpu2/cpuidle/state*/{usage,time}
}

show 0
show 1500
show 0
root at juno:~# taskset -c 2 bash ./show2.sh
=== 0:
1893
894
5417
1398675
65997648
3818880750
---
1895
905
5434
1401721
68076867
3826795502
=== 1500:
1895
905
5434
1401721
68076867
3826795502
---
1895
918
5447
1401721
69403510
3835466081
=== 0:
1895
918
5447
1401721
69403510
3835466081
---
1896
929
5463
1403577
71454839
3843409979

googling suggests the /dev/cpu_dma_latency file should be *kept* open,
and written a 32-bit binary number:

https://access.redhat.com/articles/65410

If so (I don't have time to test), this cpu debug documentation is very
deceptive.

Kim



More information about the linux-arm-kernel mailing list