All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arianna Avanzini <avanzini.arianna@gmail.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Paolo Gai <pj@evidence.eu.com>,
	Paolo Valente <paolo.valente@unimore.it>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Dario Faggioli <dario.faggioli@citrix.com>,
	Claudio Scordino <claudio@evidence.eu.com>,
	xen-devel <xen-devel@lists.xen.org>,
	Julien Grall <julien.grall@citrix.com>,
	Roger Pau Monne <roger.paumonne@citrix.com>
Subject: Re: Xen on ARM: "Failed to allocate contiguous memory for dom0" with dom0_mem greater than 256MB
Date: Fri, 24 Jan 2014 17:17:37 +0100	[thread overview]
Message-ID: <52E29221.2080804@gmail.com> (raw)
In-Reply-To: <1390558450.2124.24.camel@kazak.uk.xensource.com>

On 01/24/2014 11:14 AM, Ian Campbell wrote:
> On Fri, 2014-01-24 at 11:00 +0100, Arianna Avanzini wrote:
>> I noticed that Xen 4.4 fails to boot the dom0 if more than 256MB of RAM are
>> assigned to it by providing the dom0_mem boot option. The error message produced
>> during the boot process is the following.
> 
> This is an unfortunate side effect of the use of the 1:1 mapping. The
> threads:
>         "Master not working on Allwinner A20"
>         "create multiple banks for dom0 in 1:1 mapping if necessary"
> Have some more details, but in short the allocation of dom0 memory needs
> to be done in a single chunk and because of the way the Xen allocator
> works it will also be aligned to its own size -- this creates some
> limitations on the size of the region vs what memory is free at start of
> day
> 
> I'm afraid this probably won't be solved for Xen 4.4, since the change
> is likely to be rather intrusive.
> 

I see, thank you for the explanation.


> As a workaround you could try changing the load addresses of Xen and the
> kernel, dtb etc used by u-boot to pack them towards the top of RAM. This
> *should* result in the entire lower half of RAM being available which
> will make it more likely to achieve the necessary alignment constraints
> for a dom0 taking up to half of the system RAM. I've not actually tried
> this but I'd recommend trying the following addresses from the top of
> RAM:
> 	-2M: Leave free for Xen to relocate to
> 	-4M: dom0 kernel
> 	-6M: DTB
> 	-8M: Initial Xen load address
> 
> If you have an initrd then put it between dom0 kernel and dtb and bump
> everything else down, likewise if anything is bigger than 2M then round
> up to 2M and push everything down to accommodate it.
> 
> Also consider that for a Xen system it is common to only give dom0 a
> fairly small fraction of the system RAM in order to leave as much as
> possible for guest domains. What target amount of dom0 memory are you
> aiming for? 256M or even 128M is probably plenty if you are going to run
> a few domains.
> 

So far, 256MB of RAM are actually enough for a dom0 in my use-case. Thank you
again for the info and hints, and for taking the time to test both the failing
scenario and the workaround.



> Ian.
> 


-- 
/*
 * Arianna Avanzini
 * avanzini.arianna@gmail.com
 * 73628@studenti.unimore.it
 */

      parent reply	other threads:[~2014-01-24 16:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-24 10:00 Xen on ARM: "Failed to allocate contiguous memory for dom0" with dom0_mem greater than 256MB Arianna Avanzini
2014-01-24 10:14 ` Ian Campbell
2014-01-24 12:02   ` Ian Campbell
2014-01-24 16:17   ` Arianna Avanzini [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=52E29221.2080804@gmail.com \
    --to=avanzini.arianna@gmail.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=claudio@evidence.eu.com \
    --cc=dario.faggioli@citrix.com \
    --cc=julien.grall@citrix.com \
    --cc=paolo.valente@unimore.it \
    --cc=pj@evidence.eu.com \
    --cc=roger.paumonne@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.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.