All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Daniel Musketa <daniel.musketa@googlemail.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: Linux 3.0.0 dom0_mem= not working
Date: Wed, 3 Aug 2011 22:54:45 -0400	[thread overview]
Message-ID: <20110804025445.GA10445@dumpdata.com> (raw)
In-Reply-To: <CAEJD-+Mvfk=uVFHtVXJh-mvOBpMnJEMxihELtF_oA7L5uo52LA@mail.gmail.com>

On Thu, Aug 04, 2011 at 12:07:41AM +0200, Daniel Musketa wrote:
> 2011/8/3 Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>:
> > On Mon, Aug 01, 2011 at 11:59:41PM +0200, Daniel Musketa wrote:
> >> Hello,
> >>
> >> when I boot linux-3.0.0 on xen-4.0.2.gz with dom0_mem=4000M I only get
> >> 313M of RAM in dom0.
> >
> [...]
> > .. on the Linux stanze, add 'mem=4G'. Can you try that?
> 
> I did. dmesg output with "mem=4000M" in dom0's /proc/cmdline is attached.

Aha. It is your E820 that is causing this funny thing.
> 
> Thanks,
> Daniel

> [    0.000000]  Xen: 000000008f64f000 - 000000008f6e7000 (ACPI data)
> [    0.000000]  Xen: 000000008f6e7000 - 000000008f6f1000 (ACPI NVS)
> [    0.000000]  Xen: 000000008f6f1000 - 000000008f6f2000 (ACPI data)
> [    0.000000]  Xen: 000000008f6f2000 - 000000008f7cf000 (ACPI NVS)
> [    0.000000]  Xen: 000000008f7cf000 - 000000008f800000 (ACPI data)
> [    0.000000]  Xen: 000000008f800000 - 0000000090000000 (reserved)
> [    0.000000]  Xen: 00000000a0000000 - 00000000b0000000 (reserved)
> [    0.000000]  Xen: 00000000fc000000 - 00000000fd000000 (reserved)
> [    0.000000]  Xen: 00000000fec00000 - 00000000fec01000 (reserved)
> [    0.000000]  Xen: 00000000fec90000 - 00000000fec91000 (reserved)
> [    0.000000]  Xen: 00000000fed1c000 - 00000000fed44000 (reserved)
> [    0.000000]  Xen: 00000000fee00000 - 00000000fee01000 (reserved)
> [    0.000000]  Xen: 00000000ff800000 - 0000000100000000 (reserved)
> [    0.000000]  Xen: 0000000100000000 - 00000006ca000000 (usable)

So this is what the E820 sees (well, there is somet more stuff above the ACPI data but your buffer ran out)


> [    0.000000] e820 remove range: 00000000fa000000 - ffffffffffffffff (usable)
> [    0.000000] bootconsole [xenboot0] enabled
> [    0.000000] NX (Execute Disable) protection: active
> [    0.000000] user-defined physical RAM map:
> [    0.000000]  user: 0000000000000000 - 0000000000099000 (usable)
> [    0.000000]  user: 0000000000099800 - 0000000000100000 (reserved)
> [    0.000000]  user: 0000000000100000 - 000000008c3a0000 (usable)

So if you look here, you can see hte usable section being from 1MB up
to 2352MB (duh!) That is what the BIOS has setup.

> [    0.000000]  user: 000000008c3a0000 - 000000008c47b000 (ACPI NVS)
> [    0.000000]  user: 000000008c47b000 - 000000008c560000 (ACPI data)
> [    0.000000]  user: 000000008c560000 - 000000008d960000 (ACPI NVS)
> [    0.000000]  user: 000000008d960000 - 000000008f602000 (ACPI data)
> [    0.000000]  user: 000000008f602000 - 000000008f64f000 (reserved)
> [    0.000000]  user: 000000008f64f000 - 000000008f6e7000 (ACPI data)
> [    0.000000]  user: 000000008f6e7000 - 000000008f6f1000 (ACPI NVS)
> [    0.000000]  user: 000000008f6f1000 - 000000008f6f2000 (ACPI data)
> [    0.000000]  user: 000000008f6f2000 - 000000008f7cf000 (ACPI NVS)
> [    0.000000]  user: 000000008f7cf000 - 000000008f800000 (ACPI data)
> [    0.000000]  user: 000000008f800000 - 0000000090000000 (reserved)
> [    0.000000]  user: 00000000a0000000 - 00000000b0000000 (reserved)
> [    0.000000]  user: 00000000fc000000 - 00000000fd000000 (reserved)
> [    0.000000]  user: 00000000fec00000 - 00000000fec01000 (reserved)
> [    0.000000]  user: 00000000fec90000 - 00000000fec91000 (reserved)
> [    0.000000]  user: 00000000fed1c000 - 00000000fed44000 (reserved)
> [    0.000000]  user: 00000000fee00000 - 00000000fee01000 (reserved)
> [    0.000000]  user: 00000000ff800000 - 0000000100000000 (reserved)

and since we asked the E820 to truncate any entry above the 4G, that is the
reason you don't see the rest. (if you look at the other E820 without
the mem=X you will see that)


Anyhow, other machines usually have the E820 with more usuable regions so
that when you do 'mem=4G' you actually get around 3.5GB or so - hence the
general 'try mem=4G'.

Anyhow, in your special case you need 'mem=6G' for you to see 4GB.
Kind of non-intuitive.

We really need to fix this ...

      reply	other threads:[~2011-08-04  2:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-01 21:59 Linux 3.0.0 dom0_mem= not working Daniel Musketa
2011-08-01 22:24 ` Daniel Musketa
2011-08-01 23:40   ` Konrad Rzeszutek Wilk
     [not found]     ` <CAEJD-+NshngtAQXpQmRkOTh4CA7PNO45SmqeD3sB4b9EFjqESA@mail.gmail.com>
     [not found]       ` <20110802031405.GC11133@dumpdata.com>
2011-08-02  9:08         ` Daniel Musketa
2011-08-03 15:37 ` Konrad Rzeszutek Wilk
2011-08-03 22:07   ` Daniel Musketa
2011-08-04  2:54     ` Konrad Rzeszutek Wilk [this message]

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=20110804025445.GA10445@dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=daniel.musketa@googlemail.com \
    --cc=xen-devel@lists.xensource.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 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.