From ee561259a4d156355d353f635c73f4e0447573a3 Mon Sep 17 00:00:00 2001 From: albert <> Date: Mon, 24 Jan 2005 18:30:24 +0000 Subject: [PATCH] Karel Zak provided some slabinfo documentation --- proc/slab.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/proc/slab.c b/proc/slab.c index aa7299cf..6736f0c8 100644 --- a/proc/slab.c +++ b/proc/slab.c @@ -89,9 +89,35 @@ void free_slabinfo(struct slab_info *list) } } -/* - * parse_slabinfo20 - actual parse routine for slabinfo 2.0 (2.6 kernels) - */ +// parse_slabinfo20 - actual parse routine for slabinfo 2.x (2.6 kernels) +// Note: difference between 2.0 and 2.1 is in the ": globalstat" part where version 2.1 +// has extra column . We don't use ": globalstat" part in both versions. +// +// Formats (we don't use "statistics" extensions) +// +// slabinfo - version: 2.1 +// # name \ +// : tunables \ +// : slabdata +// +// slabinfo - version: 2.1 (statistics) +// # name \ +// : tunables \ +// : slabdata \ +// : globalstat \ +// : cpustat +// +// slabinfo - version: 2.0 +// # name \ +// : tunables \ +// : slabdata +// +// slabinfo - version: 2.0 (statistics) +// # name \ +// : tunables \ +// : slabdata \ +// : globalstat \ +// : cpustat static int parse_slabinfo20(struct slab_info **list, struct slab_stat *stats, FILE *f) {