From: Thomas Renninger <mail@renninger.de>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-pm@vger.kernel.org
Subject: Off-topic therml_stats - trans_table - File too large (exceeding static page alloc)
Date: Wed, 11 Nov 2020 09:42:45 +0100 [thread overview]
Message-ID: <4294133.gPUqu62deI@c100> (raw)
In-Reply-To: <0e0fb542b6f6b26944cb2cf356041348aeac95f6.1605006378.git.viresh.kumar@linaro.org>
Hi,
sorry for high-jacking this thread, it is at least related and afaik you are
deeper involved in this:
(cutting CC list)
Am Dienstag, 10. November 2020, 12:07:37 CET schrieb Viresh Kumar:
> The cpufreq and thermal core, both provide sysfs statistics to help
> userspace learn about the behavior of frequencies and cooling states.
...
> /sys/class/thermal/cooling_device0/stats/time_in_state_ms:state0 4097
There is the trans_table for cooling devices in the same dir:
/sys/devices/virtual/thermal/cooling_device*/stats/trans_table
I recently stumbled over this in a bug report and realized that it it seem
to overflow rather quickly due to static memory usage.
Fixing it seem to be rather complex, not sure it's worth it.
for device 0-3 I get:
cat /sys/devices/virtual/thermal/cooling_device0/stats/trans_table
From : To
: state 0
state 0: 0
and when it seem to get interesting (device 4 and 5), I get:
cat /sys/devices/virtual/thermal/cooling_device4/stats/trans_table
cat: /sys/devices/virtual/thermal/cooling_device4/stats/trans_table: File too large
Just a heads up.
Maybe it's worth to touch this as well if sysfs is changed in this area anyway.
Afaik sysfs forbids such data like whole transition tables in one file and dynamic
mem alloc.
Either it gets split up into
../cooling_device0/stats/trans_to_1
../cooling_device0/stats/trans_to_2
or maybe this should better live in debugfs?
or it could get reverted/deprecated?
or there might be another better solution to show this info...
No need to continue this off-topic thread.
Just a heads up in case someone has a neat idea...
Thomas
next prev parent reply other threads:[~2020-11-11 8:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 11:07 [PATCH] cpufreq: stats: Switch to ktime and msec instead of jiffies and usertime Viresh Kumar
2020-11-10 11:36 ` Lukasz Luba
2020-11-11 5:14 ` Viresh Kumar
2020-11-10 12:53 ` Thomas Renninger
2020-11-11 5:13 ` Viresh Kumar
2020-11-11 8:13 ` Thomas Renninger
2020-11-11 9:51 ` Viresh Kumar
2020-11-10 12:59 ` Rafael J. Wysocki
2020-11-11 5:28 ` Viresh Kumar
2020-11-11 8:42 ` Thomas Renninger [this message]
2020-11-11 10:30 ` Off-topic therml_stats - trans_table - File too large (exceeding static page alloc) Viresh Kumar
2020-11-11 23:13 ` Thomas Renninger
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=4294133.gPUqu62deI@c100 \
--to=mail@renninger.de \
--cc=linux-pm@vger.kernel.org \
--cc=viresh.kumar@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox