All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: keith <kmannth@us.ibm.com>
Cc: linux-mm <linux-mm@kvack.org>,
	"Martin J. Bligh" <mbligh@aracnet.com>,
	matt dobson <colpatch@us.ibm.com>,
	John Stultz <johnstul@us.ibm.com>,
	Andy Whitcroft <andyw@uk.ibm.com>
Subject: Re: [RFC] [Patch] For booting a i386 numa system with no memory in a node
Date: Mon, 21 Feb 2005 15:55:26 -0800	[thread overview]
Message-ID: <1109030126.25666.17.camel@localhost> (raw)
In-Reply-To: <1109029568.9817.1700.camel@knk>

[-- Attachment #1: Type: text/plain, Size: 123 bytes --]

I think you interpreted my suggestion about the if() backwards.  Is
there a reason the attached patch won't work?

-- Dave

[-- Attachment #2: collapse-if.patch --]
[-- Type: text/x-patch, Size: 1281 bytes --]



---

 sparse-dave/arch/i386/mm/discontig.c |   22 ++++++++++------------
 1 files changed, 10 insertions(+), 12 deletions(-)

diff -puN arch/i386/mm/discontig.c~collapse-if arch/i386/mm/discontig.c
--- sparse/arch/i386/mm/discontig.c~collapse-if	2005-02-21 15:53:54.000000000 -0800
+++ sparse-dave/arch/i386/mm/discontig.c	2005-02-21 15:54:03.000000000 -0800
@@ -401,24 +401,22 @@ void __init zone_sizes_init(void)
 
 		max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
 
-		if (node_has_online_mem(nid)){
-			if (start > low) {
+		if ((start > low) || !node_has_online_mem(nid)) {
 #ifdef CONFIG_HIGHMEM
 				BUG_ON(start > high);
 				zones_size[ZONE_HIGHMEM] = high - start;
 #endif
-			} else {
-				if (low < max_dma)
-					zones_size[ZONE_DMA] = low;
-				else {
-					BUG_ON(max_dma > low);
-					BUG_ON(low > high);
-					zones_size[ZONE_DMA] = max_dma;
-					zones_size[ZONE_NORMAL] = low - max_dma;
+		} else {
+			if (low < max_dma)
+				zones_size[ZONE_DMA] = low;
+			else {
+				BUG_ON(max_dma > low);
+				BUG_ON(low > high);
+				zones_size[ZONE_DMA] = max_dma;
+				zones_size[ZONE_NORMAL] = low - max_dma;
 #ifdef CONFIG_HIGHMEM
-					zones_size[ZONE_HIGHMEM] = high - low;
+				zones_size[ZONE_HIGHMEM] = high - low;
 #endif
-				}
 			}
 		}
 
_

  reply	other threads:[~2005-02-21 23:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1106881119.2040.122.camel@cog.beaverton.ibm.com>
     [not found] ` <1106882150.2040.126.camel@cog.beaverton.ibm.com>
     [not found]   ` <1106937253.27125.6.camel@knk>
     [not found]     ` <1106938993.14330.65.camel@localhost>
     [not found]       ` <1106941547.27125.25.camel@knk>
     [not found]         ` <1106942832.17936.3.camel@arrakis>
     [not found]           ` <1108611260.9817.1227.camel@knk>
     [not found]             ` <1108654782.19395.9.camel@localhost>
     [not found]               ` <1108664637.9817.1259.camel@knk>
     [not found]                 ` <1108666091.19395.29.camel@localhost>
     [not found]                   ` <1108671423.9817.1266.camel@knk>
     [not found]                     ` <421510E9.3000901@us.ibm.com>
     [not found]                       ` <1108677113.32193.8.camel@localhost>
     [not found]                         ` <42152690.4030508@us.ibm.com>
     [not found]                           ` <9230000.1108666127@flay>
     [not found]                             ` <1108686742.6482.51.camel@localhost>
2005-02-21 20:17                               ` [RFC] [Patch] For booting a i386 numa system with no memory in a node keith
2005-02-21 20:39                                 ` Dave Hansen
2005-02-21 22:03                                   ` keith
2005-02-21 22:24                                     ` Dave Hansen
2005-02-21 23:46                                       ` keith
2005-02-21 23:55                                         ` Dave Hansen [this message]
2005-02-22  0:09                                         ` Dave Hansen

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=1109030126.25666.17.camel@localhost \
    --to=haveblue@us.ibm.com \
    --cc=andyw@uk.ibm.com \
    --cc=colpatch@us.ibm.com \
    --cc=johnstul@us.ibm.com \
    --cc=kmannth@us.ibm.com \
    --cc=linux-mm@kvack.org \
    --cc=mbligh@aracnet.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.