]> granicus.if.org Git - procps-ng/commit
library: rebase & make current initial slabinfo effort
authorCraig Small <csmall@enc.com.au>
Sat, 4 Jul 2015 04:59:59 +0000 (23:59 -0500)
committerCraig Small <csmall@enc.com.au>
Tue, 14 Jul 2015 12:31:16 +0000 (22:31 +1000)
commitcf6c2155dc20fe094aaf7ba5c23c393462111605
treed5f3f0adafd3c1d8a75ff457c5702de73ac46bf1
parente445f7e6c5539594600ace7a722dafa3b91a5374
library: rebase & make current initial slabinfo effort

This was Craig's original patch, referenced below, but
it was never pushed to newlib. It has now been rebased
on top of some diskstat stuff to serve as a beginning.

The original effort was perfectly serviceable (after a
memory leak was fixed) but the approach would not have
served future PID needs when that proc_t went bye bye.

The slabtop requirements are similar to those of PIDs.
One must accommodate the variable number of slab nodes
(PIDs) while also accepting different data (char * and
unsigned long). Furthermore, some generalized means to
sort all that acquired stuff must somehow be provided.

So I wanted to try a different approach that seemed to
hold potential for satisfying future top and ps needs.
Subsequent commits will make that attempt, building on
Craig's original patch whose commit msg appears below.
------------------------------------------------------

All of the /proc/slabinfo related calls have been changed
here. They follow the same procps_slabinfo_* format.

Made both the slabtop and vmstat programs use the new
API as one was using the old one and one was just sort
of trying to do its own thing.

Sorting of slabnodes is also possible via the library.

Reference(s):
http://www.freelists.org/post/procps/Sorting-slabsprocesses,3
http://www.freelists.org/post/procps/library-rework-slabinfo-calls

Signed-off-by: Craig Small <csmall@enc.com.au>
Signed-off-by: Jim Warner <james.warner@comcast.net>
proc/libprocps.sym
proc/slab.c
proc/slab.h
slabtop.c
vmstat.c