]> granicus.if.org Git - procps-ng/commit
Increase BUFFSIZE to handle very large /proc/stat files
authorAnton Blanchard <anton@ozlabs.org>
Thu, 25 Jun 2020 23:06:12 +0000 (09:06 +1000)
committerCraig Small <csmall@dropbear.xyz>
Tue, 22 Dec 2020 02:18:44 +0000 (13:18 +1100)
commit1b9ea61116a625456a89dd7d26b3e4c3d390a599
tree66315d4a60f4618efd333dc6bd5337f63651da3a
parent4a54ae97a0a07e5d7061d70a0a9d0f35f69ed0ff
Increase BUFFSIZE to handle very large /proc/stat files

We read /proc/stat using a statically sized buffer. This was increased
to 64kB in 2005 via commit 777fcd3cf15d "/proc/stat for 1024 CPUs".

Unfortunately in 2020, 1024 CPUs is not enough for anyone. I have a
large machine where /proc/stat is 74kB, and vmstat gives incorrect
output.

Double the buffer to 128kB in the confidence that 2048 CPUs is actually
enough for anyone.

Signed-off-by: Anton Blanchard <anton@ozlabs.org>
proc/sysinfo.h