From ddb4754b33729178c79b1a352c1c6fb96fe1e4b9 Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Wed, 22 Jun 2016 00:00:00 -0500 Subject: [PATCH] library: partial revert of that numa 'fix', 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 dea403341886d7cc8338fd14461835794625b6a1 Signed-off-by: Jim Warner --- proc/stat.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/proc/stat.c b/proc/stat.c index 3c174613..22863f41 100644 --- a/proc/stat.c +++ b/proc/stat.c @@ -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;