From f71de31d58a0e4134ba2ecf29b3a84d24ca74a59 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Wed, 26 Mar 2008 18:41:38 -0700 Subject: [PATCH] slub: Remove per cpu info from per cpu statistics for !SMP Do not display the per cpu counts if this is not a SMP system. Signed-off-by: Christoph Lameter --- mm/slub.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index d70f0b4..6ebbf90 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4270,10 +4270,12 @@ static int show_stat(struct kmem_cache *s, char *buf, enum stat_item si) len = sprintf(buf, "%lu", sum); +#ifdef CONFIG_SMP for_each_online_cpu(cpu) { if (data[cpu] && len < PAGE_SIZE - 20) len += sprintf(buf + len, " C%d=%u", cpu, data[cpu]); } +#endif kfree(data); return len + sprintf(buf + len, "\n"); } -- 1.5.4.4