mirror of https://github.com/xzeldon/htop.git
81b64691a7
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 |
||
---|---|---|
.. | ||
Battery.c | ||
Battery.h | ||
IOPriority.c | ||
IOPriority.h | ||
IOPriorityPanel.c | ||
IOPriorityPanel.h | ||
LinuxCRT.c | ||
LinuxCRT.h | ||
LinuxProcess.c | ||
LinuxProcess.h | ||
LinuxProcessList.c | ||
LinuxProcessList.h | ||
Platform.c | ||
Platform.h |