top: raise the amount by which top's stat buffer grows

We won't go as far as the merge request shown below in
increasing buffer size, but we'll reduce substantially
total iterations while growing it to achieve one read.

[ and this seems in line with what was recently done ]
[ to accommodate the massively parallel environments ]
[ thru 2 abreast ('4') and combined cpus ('!') modes ]

Reference(s:
https://gitlab.com/procps-ng/procps/-/merge_requests/105

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2020-06-26 00:00:00 -05:00 committed by Craig Small
parent 8ebdaf8bcf
commit 63691d6734

View File

@ -2512,7 +2512,7 @@ static void cpus_refresh (void) {
rewind(fp);
fflush(fp);
#define buffGRW 1024
#define buffGRW 8192
/* we slurp in the entire directory thus avoiding repeated calls to fgets,
especially in a massively parallel environment. additionally, each cpu
line is then frozen in time rather than changing until we get around to