--- Documentation/vm/slabinfo.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) Index: linux-2.6/Documentation/vm/slabinfo.c =================================================================== --- linux-2.6.orig/Documentation/vm/slabinfo.c 2008-04-02 21:47:51.895009231 -0700 +++ linux-2.6/Documentation/vm/slabinfo.c 2008-04-02 21:54:09.184978456 -0700 @@ -22,6 +22,7 @@ #define MAX_SLABS 500 #define MAX_ALIASES 500 #define MAX_NODES 1024 +#define MAX_CPUS 16384 struct slabinfo { char *name; @@ -34,6 +35,8 @@ struct slabinfo { int defrag, ctor; int defrag_ratio, remote_node_defrag_ratio; unsigned long partial, objects, slabs, objects_partial, objects_total; + int numa[MAX_NODES]; + int numa_partial[MAX_NODES]; unsigned long alloc_fastpath, alloc_slowpath; unsigned long free_fastpath, free_slowpath; unsigned long free_frozen, free_add_partial, free_remove_partial; @@ -44,8 +47,6 @@ struct slabinfo { unsigned long shrink_calls, shrink_attempt_defrag, shrink_empty_slab; unsigned long shrink_slab_skipped, shrink_slab_reclaimed; unsigned long shrink_object_reclaim_failure; - int numa[MAX_NODES]; - int numa_partial[MAX_NODES]; } slabinfo[MAX_SLABS]; struct aliasinfo { @@ -281,6 +282,31 @@ void decode_numa_list(int *numa, char *t } } +void decode_cpu_list(int *cpuc, char *t) +{ + int cpu; + int nr; + + memset(cpuc, 0, NR_CPUS * sizeof(int)); + + if (!t) + return; + + while (*t == 'C') { + t++; + cpu = strtoul(t, &t, 10); + if (*t == '=') { + t++; + nr = strtoul(t, &t, 10); + cpuc[cpu] = nr; + if (nr > highest_cpu) + highest_cpu = nr; + } + while (*t == ' ') + t++; + } +} + void slab_validate(struct slabinfo *s) { if (strcmp(s->name, "*") == 0)