diff options
author | Arnavion <arnavion@gmail.com> | 2019-08-10 22:19:32 -0700 |
---|---|---|
committer | Arnavion <arnavion@gmail.com> | 2019-08-10 22:19:32 -0700 |
commit | 81b64691a7ee55e5c665ac78290495b0aea946d7 (patch) | |
tree | dc534595cc17c25bbf6cad0e978eda1a9ea419c8 /solaris | |
parent | 909bb86f05c20f0ec6f5d55994065a293932ce21 (diff) |
Move sysfs-reading code to LinuxProcessList.c and add average frequency.
This way the frequency is read from sysfs only once per update cycle
instead of every time the UI is redrawn.
This also changes the code to read from /proc/cpuinfo instead. This is because
reading from scaling_cur_freq stalls for 10ms if the previous read for the file
was more than one second ago. [1] Since htop's update cycle is
longer than that, it would cause the read of each CPU's scaling_cur_freq file
to block the UI for 20ms. This easily led to a noticeable half-second lag on
a 20+ CPU machine.
/proc/cpuinfo also has a 10ms delay, but this applies for the whole file
so the delay does not scale with the number of CPUs. [2]
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4815d3c56d1e10449a44089a47544d9ba84fad0d
[2]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7d5905dc14a87805a59f3c5bf70173aac2bb18f8
Diffstat (limited to 'solaris')
0 files changed, 0 insertions, 0 deletions