Skip to content

Commit

Permalink
[PATCH] NUMA: broken per cpu pageset counters
Browse files Browse the repository at this point in the history
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 <magnus@valinux.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Magnus Damm authored and Linus Torvalds committed Oct 26, 2005
1 parent 8712e55 commit 1c6fe94
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1c6fe94

Please sign in to comment.