mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	andi@firstfloor.org, mingo@redhat.com, tglx@linutronix.de,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] x86 boot: add E820_RESVD_KERN
Date: Mon, 30 Jun 2008 02:15:41 -0700	[thread overview]
Message-ID: <86802c440806300215w31abbcb3h6a42395e11701713@mail.gmail.com> (raw)
In-Reply-To: <1214812303.3187.10.camel@caritas-dev.intel.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 3717 bytes --]

On Mon, Jun 30, 2008 at 12:51 AM, Huang, Ying <ying.huang@intel.com> wrote:> On Mon, 2008-06-30 at 00:34 -0700, Yinghai Lu wrote:>> On Mon, Jun 30, 2008 at 12:03 AM, Huang, Ying <ying.huang@intel.com> wrote:>> > On Fri, 2008-06-27 at 15:05 -0700, Yinghai Lu wrote:>> >> On Thu, Jun 26, 2008 at 7:48 PM, Huang, Ying <ying.huang@intel.com> wrote:>> >> > On Thu, 2008-06-26 at 19:22 -0700, Yinghai Lu wrote:>> >> >> On Thu, Jun 26, 2008 at 2:47 AM, Yinghai Lu <yhlu.kernel@gmail.com> wrote:>> >> >> > On Thu, Jun 26, 2008 at 12:48 AM, Huang, Ying <ying.huang@intel.com> wrote:>> >> >> >> On Thu, 2008-06-26 at 00:25 -0700, Yinghai Lu wrote:>> >> >> >> [...]>> >> >> >>> >                if (pfn >= limit_pfn)>> >> >> >>> > @@ -977,7 +978,7 @@ u64 __init early_reserve_e820(u64 startt>> >> >> >>> >                return 0;>> >> >> >>> >>> >> >> >>> >        addr = round_down(start + size - sizet, align);>> >> >> >>> > -       e820_update_range(addr, sizet, E820_RAM, E820_RESERVED);>> >> >> >>> > +       e820_update_range(addr, sizet, E820_RAM, E820_RESVD_KERN);>> >> >> >>>>> >> >> >>> this line is not needed.>> >> >> >>>> >> >> >> Why? Memory reserved by early_rserved_e820 should not be saved during>> >> >> >> hibernation? shoudl not be saved by kdump?>> >> >> >>>> >> >>> >> > Can you tell me why this line is not needed?>> >> >>> >> > [...]>> >> >> some like the attach patch...>> >> >>>> >> >> you still can merge parse_setup_data parse_e820_ext>> >> >> also entries in parse_e820_ext is not initialized..., __copy_e820_map>> >> >> will do nothing.>> >> >>> >> > OK. Because some E820 entries are available after parse_setup_data(),>> >> > it is better to call reserve_setup_data() after calling>> >> > parse_setup_data() if update_e820_range() is used instead of>> >> > reserve_early().>> >>>> >> please modify it and test on your platforms then submit to Ingo..>> >>> > It seems that there is an issue:>> >>> > - If parse_setup_data() is called before reserve_setup_data(), and there>> > is a conflict between memory area used by setup_data and other memory>> > area, it is possible that the contents of setup_data is changed. So that>> > system may panic before reporting memory area conflict. And it seems>> > that memory area conflict is not checked by e820_update_range().>>>> what is "other memory area"? returned from find_e820_area? no one use that yet.>> I mean memory area reserved with reserved_early() or e820_update_range()> before reserve_setup_data() is called.
before parse_setup_data, reserve_early is called for1. kernel text/data/bss + initial pgt2. ramdisk3. ebdae820_update_range is not called.at this time early_res have RAM reserved by kernel.
then setup_memory_map is called, so e820 have some ranges...directlyfrom e820 table
next need to call parse_setup_datait will add some entries in e820
then reserve_setup_data is called, it will use e820_update_range toreserve setup_data itself directly in e820
...
>> And because there is no conflict check in e820_update_range(), what to> deal with potential conflict between setup_data and other memory area> regardless which one is reserved earlier?
find_e820_area will make sure it only find ram from e820 and it is notconflict with early_res

>>> Another issue related:>> Because some memmap entries are available via extended E820 memmap> (SETUP_E820_EXT), it is not strictly safe to use e820_update_range()> between setup_memory_map() and parse_setup_data(). It may be better to> parse extended E820 memmap right after setup_memory_map().
will look at the code again..
YHÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

  reply	other threads:[~2008-06-30  9:15 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-26  6:32 Huang, Ying
2008-06-26  7:25 ` Yinghai Lu
2008-06-26  7:48   ` Huang, Ying
2008-06-26  9:47     ` Yinghai Lu
2008-06-27  2:22       ` Yinghai Lu
2008-06-27  2:48         ` Huang, Ying
2008-06-27  2:52           ` Yinghai Lu
2008-06-27  3:03             ` Huang, Ying
2008-06-27  5:36               ` Yinghai Lu
2008-06-27 22:05           ` Yinghai Lu
2008-06-30  7:03             ` Huang, Ying
2008-06-30  7:34               ` Yinghai Lu
2008-06-30  7:51                 ` Huang, Ying
2008-06-30  9:15                   ` Yinghai Lu [this message]
2008-06-30  9:31                     ` Yinghai Lu
2008-06-30  9:38                     ` Huang, Ying
2008-06-30 19:05                       ` Yinghai Lu
2008-06-30 19:16                         ` Ingo Molnar
2008-06-30 22:53                           ` Yinghai Lu
2008-06-30 23:20                             ` Yinghai Lu
2008-07-01  1:09                               ` Huang, Ying
2008-07-01  1:21                                 ` Yinghai Lu
2008-07-01  8:34                                   ` Ingo Molnar
2008-07-01  2:45                               ` Huang, Ying
2008-07-01  8:39                                 ` Ingo Molnar
2008-06-30  8:28             ` 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=86802c440806300215w31abbcb3h6a42395e11701713@mail.gmail.com \
    --to=yhlu.kernel@gmail.com \
    --cc=andi@firstfloor.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=ying.huang@intel.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®