public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: Yinghai Lu <Yinghai.Lu@sun.com>,
	Christoph Lameter <clameter@sgi.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH 4/4] x86_64: increse MAX_EARLY_RES for NODE_DATA and bootmap
Date: Thu, 31 Jan 2008 14:34:30 +0100	[thread overview]
Message-ID: <200801311434.31011.ak@suse.de> (raw)
In-Reply-To: <20080131132438.GC8499@elte.hu>

On Thursday 31 January 2008 14:24:38 Ingo Molnar wrote:
> 
> * Yinghai Lu <Yinghai.Lu@Sun.COM> wrote:
> 
> > ok, discard 3, and 4.
> > 
> > how about 2 v2?
> 
> i'm leaning towards v4, but the more fundamental breakage is in the 
> early_node_mem() ad-hoc allocator that got butchered into this code a 
> year ago:

No it has nothing to do with early_node_mem which is just a thin
wrapper around find_e820_area() anyways.

I think the problem is that the page alignment in bad_addr() and friends is not 
always correct. e.g. the early_reserve for the kernel in head64.c really need to 
round up to pages. I suspect (not 100% sure yet that is the core of the problem) 

Note this was broken even before early reservation; the only difference
was that it was all hard coded in bad_addr() then.

There were various hacks around this in the past, but none fixed the problem 
completely.

>   commit a8062231d80239cf3405982858c02aea21a6066a
>   Author: Andi Kleen <ak@suse.de>
>   Date:   Fri Apr 7 19:49:21 2006 +0200
> 
>       [PATCH] x86_64: Handle empty PXMs that only contain hotplug memory
> 
>   ...
>   +static void * __init
>   +early_node_mem(int nodeid, unsigned long start, unsigned long end,
>   +             unsigned long size)
> 
> and we are now suffering the side-effects of that hack.
> 
> what i suspect we need instead is a proper early-allocator that works in 
> the e820 space.

That is find_e820_area() or rather find_e820_area+early_reserve now.

I had this implemented as a shrink wrapped function earlier for lockdep too, 
but dropped the patch because there was a nasty ordering issue with the e820 
command line parsing that i could not easily resolve.

-Andi

  reply	other threads:[~2008-01-31 13:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200801291113.35974.yinghai.lu@sun.com>
2008-01-29 19:14 ` [PATCH 2/4] x86_64: make early_node_mem return align address v2 Yinghai Lu
2008-01-30  2:39   ` Yinghai Lu
2008-01-30  3:28   ` [PATCH 2/2] x86_64: make bootmap_start page align v3 Yinghai Lu
2008-01-30 18:51     ` PATCH] x86_64: make bootmap_start page align v4 Yinghai Lu
2008-01-30 19:08       ` Andi Kleen
2008-01-30 20:15         ` Yinghai Lu
2008-01-30 23:23           ` [PATCH] x86_64: make bootmap_start page align v5 Yinghai Lu
2008-01-30 23:50             ` Yinghai Lu
2008-01-31  3:02           ` PATCH] x86_64: make bootmap_start page align v4 Andi Kleen
2008-01-31  3:29             ` Yinghai Lu
2008-01-31 13:07       ` Ingo Molnar
2008-01-29 19:15 ` [PATCH 3/4] x86_64: Use early reservation for early node data Yinghai Lu
2008-01-29 19:16 ` [PATCH 4/4] x86_64: increse MAX_EARLY_RES for NODE_DATA and bootmap Yinghai Lu
2008-01-30  2:57   ` Andi Kleen
2008-01-30  3:25     ` Yinghai Lu
2008-01-31 13:24       ` Ingo Molnar
2008-01-31 13:34         ` Andi Kleen [this message]
2008-01-31 20:37           ` [PATCH] x86_64: add debug name for early_res Yinghai Lu
2008-01-31 20:44             ` [PATCH] x86_64: make bootmap_start page align v6 Yinghai Lu
2008-01-31 21:05               ` Ingo Molnar
2008-01-31 21:30                 ` Yinghai Lu
2008-01-31 22:55                 ` [PATCH] x86_64: remove unneeded round_up Yinghai Lu
2008-01-31 22:53                   ` Ingo Molnar

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=200801311434.31011.ak@suse.de \
    --to=ak@suse.de \
    --cc=Yinghai.Lu@sun.com \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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