linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mel@csn.ul.ie>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: mingo@elte.hu, linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	apw@shadowen.org, kosaki.motohiro@gmail.com
Subject: Re: [PATCH 0/2] Relax restrictions on setting CONFIG_NUMA on x86
Date: Sat, 26 Jan 2008 17:18:03 +0000	[thread overview]
Message-ID: <20080126171803.GA29252@csn.ul.ie> (raw)
In-Reply-To: <2f11576a0801260610m29f4e7ecle9828d8bbaa462cd@mail.gmail.com>

On (26/01/08 23:10), KOSAKI Motohiro didst pronounce:
> Hi Mel
> 
> 
> >To rule it out, can you also try with the patch below applied please? It
> >should only make a difference on sparsemem so if discontigmem is still
> >crashing, there is likely another problem. Assuming it crashes, please
> >post the full dmesg output with loglevel=8 on the command line. Thanks
> 
> I buy reverse serial cable today.
> and I test again.
> 

Great

> my patch stack is
>   2.6.24-rc7 +
>   http://lkml.org/lkml/2007/8/24/220 +

Can you replace this patch with the patch below instead and try again
please? This is the patch that is actually in git-x86. Out of
curiousity, have you tried the latest mm branch from git-x86?

commit c824d2f33bf41e806cc975e659a711ba14927b62
diff --git a/arch/x86/mm/discontig_32.c b/arch/x86/mm/discontig_32.c
index 88a7499..9f1d02c 100644
--- a/arch/x86/mm/discontig_32.c
+++ b/arch/x86/mm/discontig_32.c
@@ -268,6 +268,7 @@ unsigned long __init setup_memory(void)
 {
 	int nid;
 	unsigned long system_start_pfn, system_max_low_pfn;
+	unsigned long wasted_pages;
 
 	/*
 	 * When mapping a NUMA machine we allocate the node_mem_map arrays
@@ -292,7 +293,14 @@ unsigned long __init setup_memory(void)
 		kva_start_pfn = PFN_DOWN(initrd_start - PAGE_OFFSET)
 			- kva_pages;
 #endif
-	kva_start_pfn -= kva_start_pfn & (PTRS_PER_PTE-1);
+
+	/*
+	 * We waste pages past at the end of the KVA for no good reason other
+	 * than how it is located. This is bad.
+	 */
+	wasted_pages = kva_start_pfn & (PTRS_PER_PTE-1);
+	kva_start_pfn -= wasted_pages;
+	kva_pages += wasted_pages;
 
 	system_max_low_pfn = max_low_pfn = find_max_low_pfn();
 	printk("kva_start_pfn ~ %ld find_max_low_pfn() ~ %ld\n",
@@ -345,7 +353,8 @@ unsigned long __init setup_memory(void)
 
 void __init numa_kva_reserve(void)
 {
-	reserve_bootmem(PFN_PHYS(kva_start_pfn),PFN_PHYS(kva_pages));
+	if (kva_pages)
+		reserve_bootmem(PFN_PHYS(kva_start_pfn), PFN_PHYS(kva_pages));
 }
 
 void __init zone_sizes_init(void)

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

  parent reply	other threads:[~2008-01-26 17:18 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-18 15:35 [PATCH 0/2] Relax restrictions on setting CONFIG_NUMA on x86 Mel Gorman
2008-01-18 15:35 ` [PATCH 1/2] Do not require CONFIG_HIGHMEM64G to set " Mel Gorman
2008-01-18 16:17   ` Ingo Molnar
2008-01-18 15:36 ` [PATCH 2/2] Allow any x86 sub-architecture type to set CONFIG_NUMA Mel Gorman
2008-01-18 16:17   ` Ingo Molnar
2008-01-19  6:35 ` [PATCH 0/2] Relax restrictions on setting CONFIG_NUMA on x86 Andi Kleen
2008-01-19 16:07   ` Mel Gorman
2008-01-22 12:14     ` Ingo Molnar
2008-01-22 12:29       ` Mel Gorman
2008-01-22 15:39         ` Ingo Molnar
2008-01-22 13:33     ` Andi Kleen
2008-01-23 10:28       ` Mel Gorman
2008-01-23 10:45         ` Andi Kleen
2008-01-23 10:57           ` Mel Gorman
2008-01-23 11:11             ` Andi Kleen
2008-01-23 11:15             ` [PATCH 0/2] Relax restrictions on setting CONFIG_NUMA on x86 II Andi Kleen
2008-01-23 11:24               ` Mel Gorman
2008-01-23 13:48                 ` Andi Kleen
2008-01-23 14:15                   ` Mel Gorman
2008-01-21  0:38 ` [PATCH 0/2] Relax restrictions on setting CONFIG_NUMA on x86 KOSAKI Motohiro
2008-01-21 14:35   ` Mel Gorman
2008-01-21 14:49     ` Ingo Molnar
2008-01-21 16:27       ` Mel Gorman
2008-01-23  2:04   ` KOSAKI Motohiro
2008-01-23 10:22     ` Mel Gorman
2008-01-24  3:19       ` KOSAKI Motohiro
2008-01-23 10:23     ` Mel Gorman
2008-01-26 14:10       ` KOSAKI Motohiro
2008-01-26 17:10         ` KOSAKI Motohiro
2008-01-26 17:18         ` Mel Gorman [this message]
2008-01-27  6:54           ` KOSAKI Motohiro
2008-01-28 15:02             ` Ingo Molnar
2008-01-29  2:57               ` KOSAKI Motohiro
2008-01-29 11:34             ` Mel Gorman
2008-02-03  9:32               ` KOSAKI Motohiro

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=20080126171803.GA29252@csn.ul.ie \
    --to=mel@csn.ul.ie \
    --cc=apw@shadowen.org \
    --cc=kosaki.motohiro@gmail.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@elte.hu \
    /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).