mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Magnus Damm" <magnus.damm@gmail.com>
To: "Mel Gorman" <mel@csn.ul.ie>
Cc: "Magnus Damm" <magnus@valinux.co.jp>,
	linux-kernel@vger.kernel.org, "Vivek Goyal" <vgoyal@in.ibm.com>,
	"Andi Kleen" <ak@muc.de>,
	fastboot@lists.osdl.org
Subject: Re: [PATCH] x86_64: setup saved_max_pfn correctly (kdump)
Date: Fri, 3 Nov 2006 03:05:08 +0900	[thread overview]
Message-ID: <aec7e5c30611021005y2f26319ei1c61963d354a933f@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0611021604080.14806@skynet.skynet.ie>

Hi Mel,

Thanks for your input! Great work with the add_active_range() code.

On 11/3/06, Mel Gorman <mel@csn.ul.ie> wrote:
> Hey Magnus,
>
> I see what you are doing and why. However if you look in
> arch/x86_64/kernel/setup.c, you'll see
>
>          parse_early_param();
>
>          finish_e820_parsing();
>
>          e820_register_active_regions(0, 0, -1UL);
>
> If you just called e820_register_active_regions(0, 0, -1UL) before
> parse_early_param(), would it still fix the problem without having to call
> e820_register_active_regions(0, 0, -1UL) twice?

Well, I guess it is possible to move the
e820_register_active_regions() up, but I'm not sure if that would give
us anything.

We need to call e820_register_active_regions() before e820_end_of_ram,
that's for sure, but the "exactmap" code in parse_memmap_opt() sets
e820.nr_map to 0 after the call to e820_end_of_ram(). Then it adds a
new set of user-supplied ranges to the e820 map which then need to be
registered using e820_register_active_regions().

So yeah, we can move the function up above parse_early_param() but
then we need to insert another call to e820_register_active_regions()
somewhere after all user-supplied ranges have been added.

Another solution could be to rewrite e820_end_of_ram() to instead scan
e820.map[] backwards from e820.nr_map - 1 to locate the last ram page.
But can you do that in two lines of code? =)

Thanks!

/ magnus

  reply	other threads:[~2006-11-02 18:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-02 13:19 Magnus Damm
2006-11-02 14:28 ` Vivek Goyal
2006-11-02 17:40   ` Magnus Damm
2006-11-02 18:07     ` Vivek Goyal
2006-11-02 16:08 ` Mel Gorman
2006-11-02 18:05   ` Magnus Damm [this message]
2006-11-02 18:20     ` Vivek Goyal
2006-11-02 18:28       ` Magnus Damm
2006-11-02 22:41     ` Mel Gorman
2006-11-02 17:40 ` Andi Kleen
2006-11-02 18:20   ` Magnus Damm

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=aec7e5c30611021005y2f26319ei1c61963d354a933f@mail.gmail.com \
    --to=magnus.damm@gmail.com \
    --cc=ak@muc.de \
    --cc=fastboot@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=magnus@valinux.co.jp \
    --cc=mel@csn.ul.ie \
    --cc=vgoyal@in.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

all inboxes | Powered by JetHome®