]> granicus.if.org Git - procps-ng/commit
top: swat nasty obscure bug associated with numa nodes
authorJim Warner <james.warner@comcast.net>
Tue, 14 Jun 2016 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Fri, 17 Jun 2016 11:44:29 +0000 (21:44 +1000)
commit61647f1b951f3b4389ce2321cbbb258103f1c8fa
tree44fd1505657c2c2883e214a3d9cd63063fd38834
parent92c72166dbeb855d0f2a37492e9086300ba871c9
top: swat nasty obscure bug associated with numa nodes

When experimenting with two macro constants for stat.c
(#define STACKS_INCR & #define NEWOLD_INCR), a bug was
revealed in top, only surfacing if both were set to 1.

At those settings an absolute minimum number of stacks
would be allocated for CPUs & numa NODEs. This in turn
led top to overrun the lessor number of nodes since he
used the cpu index when accessing those numa stack(s).

What he should have been accessing was the cpu stacks.

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c