linux_dsm_epyc7002/Documentation
Viresh Kumar 8ea229511e thermal: Add cooling device's statistics in sysfs
This extends the sysfs interface for thermal cooling devices and exposes
some pretty useful statistics. These statistics have proven to be quite
useful specially while doing benchmarks related to the task scheduler,
where we want to make sure that nothing has disrupted the test,
specially the cooling device which may have put constraints on the CPUs.
The information exposed here tells us to what extent the CPUs were
constrained by the thermal framework.

The write-only "reset" file is used to reset the statistics.

The read-only "time_in_state_ms" file shows the time (in msec) spent by the
device in the respective cooling states, and it prints one line per
cooling state.

The read-only "total_trans" file shows single positive integer value
showing the total number of cooling state transitions the device has
gone through since the time the cooling device is registered or the time
when statistics were reset last.

The read-only "trans_table" file shows a two dimensional matrix, where
an entry <i,j> (row i, column j) represents the number of transitions
from State_i to State_j.

This is how the directory structure looks like for a single cooling
device:

$ ls -R /sys/class/thermal/cooling_device0/
/sys/class/thermal/cooling_device0/:
cur_state  max_state  power  stats  subsystem  type  uevent

/sys/class/thermal/cooling_device0/power:
autosuspend_delay_ms  runtime_active_time  runtime_suspended_time
control               runtime_status

/sys/class/thermal/cooling_device0/stats:
reset  time_in_state_ms  total_trans  trans_table

This is tested on ARM 64-bit Hisilicon hikey620 board running Ubuntu and
ARM 64-bit Hisilicon hikey960 board running Android.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2018-04-02 21:49:01 +08:00
..
ABI ACPI updates for v4.16-rc2 2018-02-15 14:50:32 -08:00
accelerators ocxl: Document the OCXL_IOCTL_GET_METADATA IOCTL 2018-03-02 13:02:15 +11:00
accounting
acpi
admin-guide More ACPI updates for v4.16-rc1 2018-02-09 09:44:25 -08:00
aoe
arm
arm64
auxdisplay
backlight
blackfin
block
blockdev
bpf bpf: add documentation to compare clang "-target bpf" and default target 2018-02-02 11:14:19 +01:00
bus-devices
cdrom
cgroup-v1
cma
connector
console
core-api idr: Add documentation 2018-02-06 16:41:29 -05:00
cpu-freq cpufreq: Add and use cpufreq_for_each_{valid_,}entry_idx() 2018-02-08 10:21:39 +01:00
cpuidle
cris
crypto
dev-tools
device-mapper
devicetree dmaengine fixes for v4.16-rc5 2018-03-11 13:07:14 -07:00
doc-guide
driver-api s390/docs: reword airq section 2018-02-02 10:47:15 +01:00
driver-model
early-userspace
EDID
extcon
fault-injection
fb
features membarrier-sync-core: Document architecture support 2018-02-10 12:45:10 +01:00
filesystems afs: Support the AFS dynamic root 2018-02-06 14:43:37 +00:00
firmware_class
fmc
fpga
frv
gpio
gpu Fixes for 4.16. I contains fixes for deadlock on runtime suspend on few 2018-02-22 08:39:26 +10:00
hid
hwmon
i2c i2c: i801: Add missing documentation entries for Braswell and Kaby Lake 2018-02-21 09:17:20 +01:00
ia64 ia64: doc: tweak whitespace for 'console=' parameter 2018-03-05 14:41:38 -08:00
ide
iio
infiniband IB: Update references to libibverbs 2018-02-04 11:56:49 -05:00
input
ioctl
isdn
kbuild
kdump
kernel-hacking
laptops
leds
lightnvm
livepatch
locking Documentation/locking/mutex-design: Update to reflect latest changes 2018-02-11 12:28:58 +01:00
m68k
maintainer
md
media media: dvb: add continuity error indicators for memory mapped buffers 2018-02-23 05:28:41 -05:00
memory-devices
metag
mic
mips Documentation: mips: Update AU1xxx_IDE Kconfig dependencies 2018-02-01 12:45:35 -07:00
misc-devices
mmc
mn10300
mtd
namespaces
netlabel
networking docs: segmentation-offloads.txt: add SCTP info 2018-02-14 14:52:39 -05:00
nfc
nios2
nvdimm
nvmem
openrisc
parisc
PCI PCI: Update location of pci.ids file 2018-02-22 15:00:43 -06:00
pcmcia
perf
phy
platform
power
powerpc
pps
process A few late-arriving fixes, along with Konstantin's PGP document that had 2018-02-07 09:42:59 -08:00
pti
ptp
rapidio
RCU
s390
scheduler
scsi
security
serial
sh
sound
sparc
sphinx Documentation/sphinx: Fix Directive import error 2018-03-09 10:46:14 -07:00
sphinx-static
spi
sysctl Documentation/sysctl/user.txt: fix typo 2018-02-06 18:32:48 -08:00
target
thermal thermal: Add cooling device's statistics in sysfs 2018-04-02 21:49:01 +08:00
timers
trace
translations Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk 2018-02-01 13:36:15 -08:00
usb
userspace-api
virtual KVM: x86: Add a framework for supporting MSR-based features 2018-03-01 19:00:28 +01:00
vm
w1
watchdog documentation: watchdog: remove documentation of w83697hf_wdt/w83697ug_wdt 2018-02-03 11:09:54 +01:00
wimax
x86 Documentation, x86, resctrl: Make text and sample command match 2018-02-28 19:59:05 +01:00
xtensa
.gitignore
00-INDEX
atomic_bitops.txt locking/atomic/bitops: Document and clarify ordering semantics for failed test_and_{}_bit() 2018-02-13 14:55:53 +01:00
atomic_t.txt
bcache.txt
bt8xxgpio.txt
btmrvl.txt
bus-virt-phys-mapping.txt
cachetlb.txt
cgroup-v2.txt
Changes
circular-buffers.txt
clearing-warn-once.txt
clk.txt
CodingStyle
conf.py
cpu-load.txt
cputopology.txt
crc32.txt
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt
digsig.txt
DMA-API-HOWTO.txt
DMA-API.txt
DMA-attributes.txt
DMA-ISA-LPC.txt
docutils.conf
dontdiff
efi-stub.txt
eisa.txt
flexible-arrays.txt
futex-requeue-pi.txt
gcc-plugins.txt
highuid.txt
hw_random.txt
hwspinlock.txt
index.rst
intel_txt.txt
Intel-IOMMU.txt
io_ordering.txt
io-mapping.txt
iostats.txt
IPMI.txt
IRQ-affinity.txt
IRQ-domain.txt
IRQ.txt
irqflags-tracing.txt
isa.txt
isapnp.txt
kernel-per-CPU-kthreads.txt
kobject.txt
kprobes.txt
kref.txt
ldm.txt
lockup-watchdogs.txt
logo.gif
logo.txt
lsm.txt
lzo.txt
mailbox.txt
Makefile
memory-barriers.txt
memory-hotplug.txt
men-chameleon-bus.txt
nommu-mmap.txt
ntb.txt
numastat.txt
padata.txt
parport-lowlevel.txt
percpu-rw-semaphore.txt
phy.txt
pi-futex.txt
pnp.txt
preempt-locking.txt
pwm.txt
rbtree.txt
remoteproc.txt
rfkill.txt
robust-futex-ABI.txt
robust-futexes.txt
rpmsg.txt
rtc.txt
SAK.txt
sgi-ioc4.txt
siphash.txt
SM501.txt
smsc_ece1099.txt
speculation.txt
static-keys.txt
SubmittingPatches
svga.txt
switchtec.txt
sync_file.txt
tee.txt
this_cpu_ops.txt
unaligned-memory-access.txt
vfio-mediated-device.txt
vfio.txt
video-output.txt
xillybus.txt
xz.txt
zorro.txt