All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org
Subject: Re: [PATCH v3 8/8] xen: arm: allocate more than one bank for 1:1 domain 0 if needed
Date: Fri, 27 Jun 2014 11:31:10 +0100	[thread overview]
Message-ID: <53AD47EE.4000106@linaro.org> (raw)
In-Reply-To: <1403861047.32314.15.camel@kazak.uk.xensource.com>

Hi Ian,

On 27/06/14 10:24, Ian Campbell wrote:
>> This has to be: bits <= (...). Indeed, we want to try all possible zone.
>
> Damn. I tested this on midway with "dom0_mem=128M mem=1G" and saw a
> failure (which is fixed in this iteration). But obviously midway and
> vexpress differ in their physical RAM addresses which caused me to miss
> this second failure.
>
> Have you tried that change? bits < 32 gives you 32-bits (i.e. 0..31)
> which should cover everything up to 4G. Or else I'm misremembering some
> quirk of the allocation interface.

Yes, without the change "<=" I was unable to allocate the first bank.

The memory layout is
(XEN) Checking for initrd in /chosen
(XEN) RAM: 0000000080000000 - 000000009fffffff
(XEN) RAM: 00000000a0000000 - 00000000bfffffff
(XEN)
(XEN) MODULE[1]: 000000009fee6000 - 000000009feea000
(XEN) MODULE[2]: 00000000a0008000 - 00000000a033f458
(XEN)  RESVD[0]: 0000000081f00000 - 0000000081f04000
(XEN)  RESVD[1]: 000000009fee6000 - 000000009feea000

> Does vexpress really have memory high enough up that excluding bits==32
> excludes it? I thought it was down in the 1-3GB range.

The first bank allocating is situated just above 2GB
BANK[0] 0x000000a8000000-0x000000b0000000

But I'm unable to find enough memory unless when I pass bits=32 to the 
allocator.

>> I'm looking why Xen doesn't try to allocate in lower memory the first bank.
>
> Usually it means that at least single page is allocated in each 128MB
> block lower down, which can happen depending on how your boot modules
> are laid out.

With my current layout (see above), I should have space in the first 
bank (around 0x80000000). I don't really understand why Xen is not 
trying to use it.

> I did consider making
> min_low_order = get_order_from_bytes(min_t(paddr_t, dom0_mem/4, MB(128)));
>
> i.e. for a dom0_mem <= 128MB allowing to be split into 4x32MB banks if
> necessary. Or perhaps /2 would be better since 32MB is small enough that
> we might have trouble with placing the kernel and modules etc in a
> single bank.

Require a 128Mb hole in the memory doesn't seem too mad. I would keep 
this minimum value.

Regards,

-- 
Julien Grall

  reply	other threads:[~2014-06-27 10:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26 10:16 [PATCH v3 0/8] xen: arm: Use super pages in p2m Ian Campbell
2014-06-26 10:17 ` [PATCH v3 1/8] xen: arm: dump vcpu gic info in arch_dump_vcpu_info Ian Campbell
2014-06-26 10:17 ` [PATCH v3 2/8] tools/libxc: pull min/max_t into xc_private.h Ian Campbell
2014-06-26 10:34   ` Ian Jackson
2014-06-26 10:17 ` [PATCH v3 3/8] tools: arm: allocate large pages to guests Ian Campbell
2014-06-26 10:17 ` [PATCH v3 4/8] xen: arm: only put_page for p2m operations which require it Ian Campbell
2014-06-26 10:17 ` [PATCH v3 5/8] xen: arm: handle superpage mappings in p2m_lookup Ian Campbell
2014-06-26 10:17 ` [PATCH v3 6/8] xen: arm: add some helpers for assessing p2m pte Ian Campbell
2014-06-26 15:07   ` Julien Grall
2014-06-26 10:17 ` [PATCH v3 7/8] xen: arm: use superpages in p2m when pages are suitably aligned Ian Campbell
2014-06-26 15:16   ` Julien Grall
2014-06-26 10:17 ` [PATCH v3 8/8] xen: arm: allocate more than one bank for 1:1 domain 0 if needed Ian Campbell
2014-06-26 18:20   ` Julien Grall
2014-06-27  9:24     ` Ian Campbell
2014-06-27 10:31       ` Julien Grall [this message]
2014-06-27 11:54         ` Julien Grall
2014-06-27 12:52       ` Julien Grall
2014-06-27 13:01         ` Ian Campbell
2014-06-27 13:04           ` Julien Grall
2014-06-27 13:09             ` Ian Campbell
2014-06-30 15:58               ` Ian Campbell
2014-06-30 16:10                 ` Julien Grall
2014-06-30 16:14                   ` Ian Campbell
2014-06-30 16:20                     ` Julien Grall
2014-06-30 16:27                       ` Ian Campbell
2014-06-30 16:29                         ` Julien Grall
2014-06-30 16:31                           ` Ian Campbell
2014-06-26 15:03 ` [PATCH v3 0/8] xen: arm: Use super pages in p2m Julien Grall
2014-06-30 15:44   ` Ian Campbell

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=53AD47EE.4000106@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --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.