linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: Nishanth Aravamudan <nacc@us.ibm.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	jlarrew@linux.vnet.ibm.com
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH 2/5] powerpc/numa: Check for all VPHN changes
Date: Sun, 30 Jan 2011 09:26:19 +1100	[thread overview]
Message-ID: <20110130092619.7e414259@kryten> (raw)
In-Reply-To: <20110130092434.42a887ef@kryten>


The hypervisor uses unsigned 1 byte counters to signal topology changes to
the OS. Since they can wrap we need to check for any difference, not just if
the hypervisor count is greater than the previous count.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

Index: linux-2.6/arch/powerpc/mm/numa.c
===================================================================
--- linux-2.6.orig/arch/powerpc/mm/numa.c	2011-01-29 11:16:56.741843175 +1100
+++ linux-2.6/arch/powerpc/mm/numa.c	2011-01-29 12:44:42.059356526 +1100
@@ -1342,7 +1342,7 @@ static int update_cpu_associativity_chan
 		volatile u8 *hypervisor_counts = lppaca[cpu].vphn_assoc_counts;
 
 		for (i = 0; i < distance_ref_points_depth; i++) {
-			if (hypervisor_counts[i] > counts[i]) {
+			if (hypervisor_counts[i] != counts[i]) {
 				counts[i] = hypervisor_counts[i];
 				changed = 1;
 			}

  reply	other threads:[~2011-01-29 22:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-18  1:31 2.6.37-git17 virtual IO boot failure Anton Blanchard
2011-01-18 22:47 ` Nishanth Aravamudan
2011-01-19  0:48   ` Nishanth Aravamudan
2011-01-19  6:06     ` Benjamin Herrenschmidt
2011-01-19 22:26       ` Nishanth Aravamudan
2011-01-19  4:06   ` Benjamin Herrenschmidt
2011-01-19  4:37     ` Nishanth Aravamudan
2011-01-19  4:54       ` Benjamin Herrenschmidt
2011-01-29 22:22       ` Anton Blanchard
2011-01-29 22:24         ` [PATCH 1/5] powerpc/numa: Only use active VPHN count fields Anton Blanchard
2011-01-29 22:26           ` Anton Blanchard [this message]
2011-01-29 22:28           ` [PATCH 3/5] powerpc/numa: Add length when creating OF properties via VPHN Anton Blanchard
2011-01-29 22:35           ` [PATCH 4/5] powerpc/numa: Disable VPHN on dedicated processor partitions Anton Blanchard
2011-01-29 22:37           ` [PATCH 5/5] powerpc/numa: Fix bug in unmap_cpu_from_node Anton Blanchard

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=20110130092619.7e414259@kryten \
    --to=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=jlarrew@linux.vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=nacc@us.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).