File procps-vmstat-1b9ea611.patch of Package procps.28824

commit 1b9ea61116a625456a89dd7d26b3e4c3d390a599
Author: Anton Blanchard <anton@ozlabs.org>
Date:   Fri Jun 26 09:06:12 2020 +1000

    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>

diff --git proc/sysinfo.h proc/sysinfo.h
index 0a2c888..73e84bc 100644
--- proc/sysinfo.h
+++ proc/sysinfo.h
@@ -58,7 +58,7 @@ extern unsigned long kb_inactive;
 extern unsigned long kb_mapped;
 extern unsigned long kb_pagetables;
 
-#define BUFFSIZE (64*1024)
+#define BUFFSIZE (128*1024)
 typedef unsigned long long jiff;
 extern void getstat(jiff *__restrict cuse, jiff *__restrict cice, jiff *__restrict csys, jiff *__restrict cide, jiff *__restrict ciow, jiff *__restrict cxxx, jiff *__restrict cyyy, jiff *__restrict czzz,
 	     unsigned long *__restrict pin, unsigned long *__restrict pout, unsigned long *__restrict s_in, unsigned long *__restrict sout,
openSUSE Build Service is sponsored by