From: Magnus Damm Date: Wed, 26 Oct 2005 08:58:59 +0000 (-0700) Subject: [PATCH] NUMA: broken per cpu pageset counters X-Git-Tag: v2.6.14~16 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=1c6fe9465941df04a1ad8f009bd6d95b20072a58;p=linux-2.6-omap-h63xx.git [PATCH] NUMA: broken per cpu pageset counters The NUMA counters in struct per_cpu_pageset (linux/mmzone.h) are never cleared today. This works ok for CPU 0 on NUMA machines because boot_pageset[] is already zero, but for other CPU:s this results in uninitialized counters. Signed-off-by: Magnus Damm Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index cc1fe2672a3..e1d3d77f4ae 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1750,6 +1750,8 @@ inline void setup_pageset(struct per_cpu_pageset *p, unsigned long batch) { struct per_cpu_pages *pcp; + memset(p, 0, sizeof(*p)); + pcp = &p->pcp[0]; /* hot */ pcp->count = 0; pcp->low = 2 * batch;