linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Magnus Damm <magnus@valinux.co.jp>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: Magnus Damm <magnus@valinux.co.jp>
Subject: [PATCH] NUMA: broken per cpu pageset counters
Date: Tue, 25 Oct 2005 20:17:42 +0900 (JST)	[thread overview]
Message-ID: <20051025111802.7378.40401.sendpatchset@cherry.local> (raw)

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>
---

Tested on dual x86_64 hardware with 2.6.14-rc5-git5. 

/proc/zoneinfo:
....
            numa_hit:       15064664480448666958
            numa_miss:      15061573751478353360
            numa_foreign:   15082960697523852788
            interleave_hit: 15083101074612482007
            local_node:     15084090651888212814
            other_node:     5860683432910092144
....

--- linux-2.6.14-rc5-git5/mm/page_alloc.c	2005-10-24 15:37:48.000000000 +0900
+++ linux-2.6.14-rc5-git5-setup_pageset_zero_fix/mm/page_alloc.c	2005-10-25 19:48:06.000000000 +0900
@@ -1750,6 +1750,8 @@ inline void setup_pageset(struct per_cpu
 {
 	struct per_cpu_pages *pcp;
 
+	memset(p, 0, sizeof(*p));
+
 	pcp = &p->pcp[0];		/* hot */
 	pcp->count = 0;
 	pcp->low = 2 * batch;

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

                 reply	other threads:[~2005-10-25 11:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051025111802.7378.40401.sendpatchset@cherry.local \
    --to=magnus@valinux.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox