top: introduce a plug-in approach for the NUMA support
authorJim Warner <james.warner@comcast.net>
Thu, 25 Apr 2013 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Sat, 4 May 2013 23:12:08 +0000 (09:12 +1000)
commitedba932a7e9b950dd91bc486e107788e977a5186
tree5f4b97472312c1735c2d174a17289e8f4f10ab85
parent5686877cd4c83a2daf1be6f2f7f93cd2c1451e75
top: introduce a plug-in approach for the NUMA support

The NUMA/Nodes support in top has gone through several
evolutions (primarily dealing with build-sys options).
With this commit the library dependency issues are now
moot and the responsibilities for run-time loading and
dynamic linking are assumed by the top program itself.

Henceforth, if top is executed in an environment where
libnuma.so is present, top will offer such extensions.
Even more importantly, when a missing libnuma is later
installed, top will offer numa support auto-magically.
All NUMA/Node build-sys dependencies are thus removed.

The former NUMA_ENABLED define has become NUMA_DISABLE
should anyone wish to test user interface implications
in an environment that *does* have libnuma. It is also
represented as the ./configure option: --disable-numa.

Lastly, the 't' (View_STATES) toggle will be forced on
for sanity whenever the '1', '2' or '3' keys are used.

Reference(s):
. original idea from: Dr. Fink <werner@suse.de>
http://www.freelists.org/post/procps/top-NUMA-node-CPU-utilization-support,18
. original numa suppoort
commit 8d989c68c068541a814bf0d2340ac9b0373f24b5

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