library: partial revert of that numa 'fix', <STAT> api

This patch represents the partial revert of the commit
referenced below. And, so that yours truly (the author
for goodness sake) doesn't shoot his tootsies again in
the future, a cautionary programmer comment was added.

Reference(s):
commit dea4033418

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2016-06-22 00:00:00 -05:00 committed by Craig Small
parent 8444a6fe0b
commit ddb4754b33

View File

@ -965,14 +965,17 @@ PROCPS_EXPORT struct stat_reaped *procps_stat_reap (
return NULL;
break;
case STAT_REAP_CPUS_AND_NODES:
if (!stacks_fetch_tics(info, &info->cpus))
return NULL;
#ifndef NUMA_DISABLE
/* note: if we are doing numa at all, we must call make_numa_hist
before we build (fetch) the cpu stacks since the read_stat guy
will have marked (temporarily) all the cpu node ids as invalid */
if (0 > make_numa_hist(info))
return NULL;
// tolerate an unexpected absence of libnuma.so ...
stacks_fetch_tics(info, &info->nodes);
#endif
if (!stacks_fetch_tics(info, &info->cpus))
return NULL;
break;
default:
return NULL;