From: "H. Peter Anvin" <hpa@zytor.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: "kexec@lists.infradead.org" <kexec@lists.infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Thomas Renninger <trenn@suse.de>,
Simon Horman <horms@verge.net.au>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Cliff Wickman <cpw@sgi.com>, Vivek Goyal <vgoyal@redhat.com>
Subject: Re: [PATCH 5/5] kexec: X86: Pass memory ranges via e820 table instead of memmap= boot parameter
Date: Thu, 11 Apr 2013 08:06:50 -0700 [thread overview]
Message-ID: <5166D18A.7090800@zytor.com> (raw)
In-Reply-To: <CAE9FiQXnZzVC7dtvXWrqz=jYAGH053R8Vw1qkrMd2F+hAaMxdQ@mail.gmail.com>
On 04/11/2013 07:55 AM, Yinghai Lu wrote:
> On Thu, Apr 11, 2013 at 5:26 AM, Thomas Renninger <trenn@suse.de> wrote:
>> Currently ranges are passed via kernel boot parameters:
>> memmap=exactmap memmap=X#Y memmap=
>>
>> Pass them via e820 table directly instead.
>
> how to address "saved_max_pfn" referring in kernel?
>
> kernel need to use saved_max_pfn from old e820 in
> drivers/char/mem.c::read_oldmem()
>
> mips and powerpc they are passing that from command line "savemaxmem="
>
> x86 should use that too?
>
Oh bloody hell, yet another f-ing "max_pfn" variable.
The *only* one that makes any kind of sense is max_low_pfn (marking the
cutoff to highmem)... the pretty much the rest of them are just plain wrong.
And I don't mean "mildly annoying", I mean "catastrophically wrong
semantics". In this case, it introduces a completely arbitrary
distinction between a nonmemory range below a high water mark and a
nonmemory range above that high water mark. In fact, from reading the
code it seems pretty clear that the device will blindly assume that
anything below saved_max_pfn is memory and will try to map it
cachable... which will #MC on quite a few machines.
This kind of crap HAS TO STOP. Memory is discontiguous, deal with it
and deal with it properly.
I also have to admit that I don't see the difference between /dev/mem
and /dev/oldmem, as the former allows access to memory ranges outside
the ones used by the current kernel, which is what the oldmem device
seems to be intended to od.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
WARNING: multiple messages have this Message-ID (diff)
From: "H. Peter Anvin" <hpa@zytor.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Thomas Renninger <trenn@suse.de>,
Simon Horman <horms@verge.net.au>,
"kexec@lists.infradead.org" <kexec@lists.infradead.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Vivek Goyal <vgoyal@redhat.com>, Cliff Wickman <cpw@sgi.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/5] kexec: X86: Pass memory ranges via e820 table instead of memmap= boot parameter
Date: Thu, 11 Apr 2013 08:06:50 -0700 [thread overview]
Message-ID: <5166D18A.7090800@zytor.com> (raw)
In-Reply-To: <CAE9FiQXnZzVC7dtvXWrqz=jYAGH053R8Vw1qkrMd2F+hAaMxdQ@mail.gmail.com>
On 04/11/2013 07:55 AM, Yinghai Lu wrote:
> On Thu, Apr 11, 2013 at 5:26 AM, Thomas Renninger <trenn@suse.de> wrote:
>> Currently ranges are passed via kernel boot parameters:
>> memmap=exactmap memmap=X#Y memmap=
>>
>> Pass them via e820 table directly instead.
>
> how to address "saved_max_pfn" referring in kernel?
>
> kernel need to use saved_max_pfn from old e820 in
> drivers/char/mem.c::read_oldmem()
>
> mips and powerpc they are passing that from command line "savemaxmem="
>
> x86 should use that too?
>
Oh bloody hell, yet another f-ing "max_pfn" variable.
The *only* one that makes any kind of sense is max_low_pfn (marking the
cutoff to highmem)... the pretty much the rest of them are just plain wrong.
And I don't mean "mildly annoying", I mean "catastrophically wrong
semantics". In this case, it introduces a completely arbitrary
distinction between a nonmemory range below a high water mark and a
nonmemory range above that high water mark. In fact, from reading the
code it seems pretty clear that the device will blindly assume that
anything below saved_max_pfn is memory and will try to map it
cachable... which will #MC on quite a few machines.
This kind of crap HAS TO STOP. Memory is discontiguous, deal with it
and deal with it properly.
I also have to admit that I don't see the difference between /dev/mem
and /dev/oldmem, as the former allows access to memory ranges outside
the ones used by the current kernel, which is what the oldmem device
seems to be intended to od.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
next prev parent reply other threads:[~2013-04-11 15:07 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-11 12:26 Cleanups and passing memory ranges via e820 table instead of memmap= Thomas Renninger
2013-04-11 12:26 ` [PATCH 1/5] kexec: X86: Show e820 table which gets passed in debug mode Thomas Renninger
2013-04-11 12:26 ` [PATCH 2/5] kexec: X86: Enhance crash range debug output Thomas Renninger
2013-04-11 12:26 ` [PATCH 3/5] kexec: X86: Do not exclude memory regions in each get_xy_memory_range() func Thomas Renninger
2013-04-11 12:26 ` [PATCH 4/5] kexec: X86: make crash_memory_range global and store its no of elements in crash_ranges Thomas Renninger
2013-04-11 12:26 ` [PATCH 5/5] kexec: X86: Pass memory ranges via e820 table instead of memmap= boot parameter Thomas Renninger
2013-04-11 14:55 ` Yinghai Lu
2013-04-11 14:55 ` Yinghai Lu
2013-04-11 15:06 ` H. Peter Anvin [this message]
2013-04-11 15:06 ` H. Peter Anvin
2013-04-12 14:31 ` Vivek Goyal
2013-04-12 14:31 ` Vivek Goyal
2013-04-12 14:56 ` H. Peter Anvin
2013-04-12 14:56 ` H. Peter Anvin
2013-04-12 22:17 ` Dave Hansen
2013-04-12 22:17 ` Dave Hansen
2013-04-12 23:17 ` H. Peter Anvin
2013-04-12 23:17 ` H. Peter Anvin
2013-04-15 4:52 ` HATAYAMA Daisuke
2013-04-15 4:52 ` HATAYAMA Daisuke
2013-04-15 5:58 ` Dave Hansen
2013-04-15 5:58 ` Dave Hansen
2013-04-15 7:58 ` HATAYAMA Daisuke
2013-04-15 7:58 ` HATAYAMA Daisuke
2013-04-15 14:49 ` H. Peter Anvin
2013-04-15 14:49 ` H. Peter Anvin
2013-04-12 12:24 ` Thomas Renninger
2013-04-12 12:24 ` Thomas Renninger
2013-04-12 9:56 ` Zhang Yanfei
2013-04-12 11:12 ` Thomas Renninger
2013-04-15 9:05 ` Thomas Renninger
2013-04-15 12:20 ` H. Peter Anvin
2013-04-15 19:48 ` Thomas Renninger
2013-04-15 19:54 ` H. Peter Anvin
2013-04-16 7:52 ` Thomas Renninger
2013-04-16 11:59 ` H. Peter Anvin
2013-04-16 12:41 ` Zhang Yanfei
2013-04-12 15:24 ` Eric W. Biederman
2013-04-15 11:48 ` Thomas Renninger
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=5166D18A.7090800@zytor.com \
--to=hpa@zytor.com \
--cc=cpw@sgi.com \
--cc=ebiederm@xmission.com \
--cc=horms@verge.net.au \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=trenn@suse.de \
--cc=vgoyal@redhat.com \
--cc=yinghai@kernel.org \
/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.