htop/linux
Arnavion 81b64691a7 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
2019-08-10 22:19:32 -07:00
..
Battery.c linux/Battery.c: make sure fd is always closed 2018-02-18 10:21:22 -03:00
Battery.h Optimize Strings_startWith() 2016-08-11 10:49:35 +08:00
IOPriority.c Set idle I/O prio to 0x6007, like ionice. 2017-07-05 15:20:48 -03:00
IOPriority.h Set idle I/O prio to 0x6007, like ionice. 2017-07-05 15:20:48 -03:00
IOPriorityPanel.c Security review: check results of snprintf. 2017-07-27 16:07:50 -03:00
IOPriorityPanel.h Files moved and added for supporting separate platforms. 2014-11-24 18:55:49 -02:00
LinuxCRT.c Fix spelling of "maintainer" 2016-01-02 12:11:26 -05:00
LinuxCRT.h Move platform-dependent parts of Linux battery meter. 2014-11-27 21:04:57 -02:00
LinuxProcess.c Linux: add process->starttime and use it for STARTTIME column (#700) 2018-08-19 01:29:03 -03:00
LinuxProcess.h Linux: add process->starttime and use it for STARTTIME column (#700) 2018-08-19 01:29:03 -03:00
LinuxProcessList.c Move sysfs-reading code to LinuxProcessList.c and add average frequency. 2019-08-10 22:19:32 -07:00
LinuxProcessList.h Move sysfs-reading code to LinuxProcessList.c and add average frequency. 2019-08-10 22:19:32 -07:00
Platform.c Move sysfs-reading code to LinuxProcessList.c and add average frequency. 2019-08-10 22:19:32 -07:00
Platform.h Mark signal tables 'const' 2016-08-30 20:41:17 +08:00