]> granicus.if.org Git - procps-ng/commit
library: improve support of dynamic numa nodes, <stat>
authorJim Warner <james.warner@comcast.net>
Sat, 17 Sep 2016 07:22:22 +0000 (02:22 -0500)
committerCraig Small <csmall@enc.com.au>
Wed, 21 Sep 2016 11:06:12 +0000 (21:06 +1000)
commiteeeba3e66c4a0fca38d3fb49284d71e329a30f7f
tree48efd983e89a4d5e21a5ee0dd2194a8eb8ca7b80
parenta5ec5efc9ae701faa9f35f28dd3bb35c350531ae
library: improve support of dynamic numa nodes, <stat>

If, in fact, numa nodes are dynamic (like that current
total of on-line cpus) the existing logic was lacking.
It included an early return before checking the total.

So, this commit ensures that the nodes total is always
set or updated consistently in only a single function.
There's no need to set it at the time 'new' is called.

[ and since under our existing code this nodes total ]
[ could never possibly have been zero, the erroneous ]
[ test (with the early return) has now been whacked! ]

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