Skip to contentSkip to conversation

cpufreq dir under /sys/devices/system/cpu/cpu* is not present for online=0 cpus

DISCUSSION Ragu 2 participants 2 messages Sep 23, 2014 – Sep 30, 2014

lore
Share & tools
lore

Ragu

author
#0 lore raw

I am learning android and finding that the cpufreq dir under /sys/devices/system/cpu/cpu* is not present when online=0 for a cpu. Why are we hiding those directory and its content when a cpu goes offline/power collapse ?

Because of the above, the cpu usage is not very accurate from some tools which reads data from sysfs.

Thanks,
Ragu

#1 lore raw
Quoted 7 lines · Ragu

I am learning android and finding that the cpufreq dir under /sys/devices/system/cpu/cpu* is not present when online=0 for a cpu. Why are we hiding those directory and its content when a cpu goes offline/power collapse ?

Because of the above, the cpu usage is not very accurate from some tools which reads data from sysfs.

These were removed because the CPU isn't online anymore and so we shouldn't be able to change its frequency from userspace.

But probably this behavior can be changed to mark cpufreq directory and its file as read-only in that case.

But that is some work to do..