From: Keir Fraser <keir.xen@gmail.com>
To: Ian Campbell <Ian.Campbell@citrix.com>, Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
julien.grall@linaro.org, tim@xen.org, andre.przywara@linaro.org,
stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH 5/7] xen: support RAM at addresses 0 and 4096
Date: Fri, 13 Sep 2013 04:28:51 -0700 [thread overview]
Message-ID: <CE584503.5DCD6%keir.xen@gmail.com> (raw)
In-Reply-To: <1379071244.19256.34.camel@kazak.uk.xensource.com>
On 13/09/2013 04:20, "Ian Campbell" <Ian.Campbell@citrix.com> wrote:
> Actually, if I don't make a mess of my arithmetic then I don't think
> this is needed, at least not for correctness.
>
> page_to_zone() is still wrong for page 0, but that was true with the
> previous version too, hence the checks to avoid adding page 0 to any
> heap.
>
> The difference is that it now ends up in zone 0 (Xen, bad) instead of
> zone -1 (even worse!). Even that could be solved with this extra hunk
> (which would mean we could drop all the checks in init_*_pages from
> below too):
>
> @@ -268,7 +267,7 @@ unsigned long __init alloc_boot_pages(
>
> #define bits_to_zone(b) (((b) < (PAGE_SHIFT + 1)) ? 1 : ((b) - PAGE_SHIFT))
> #define page_to_zone(pg) (is_xen_heap_page(pg) ? MEMZONE_XEN : \
> - (fls(page_to_mfn(pg))))
> + (fls(page_to_mfn(pg)) ? : 1))
>
> typedef struct page_list_head
> heap_by_zone_and_order_t[NR_ZONES][MAX_ORDER+1];
> static heap_by_zone_and_order_t *_heap[MAX_NUMNODES];
>
> What do you think?
Yeah, looks good!
-- Keir
next prev parent reply other threads:[~2013-09-13 11:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-12 12:42 [PATCH 0/7] xen: arm: memory mangement fixes / improvements Ian Campbell
2013-09-12 12:42 ` [PATCH 1/7] xen/arm: ensure the xenheap is 32MB aligned Ian Campbell
2013-09-12 12:42 ` [PATCH 2/7] xen/arm: DOMHEAP_SECOND_PAGES is arm32 specific Ian Campbell
2013-09-12 12:42 ` [PATCH 3/7] xen/arm: Reserve FDT via early module mechanism Ian Campbell
2013-09-12 13:39 ` Julien Grall
2013-09-12 13:56 ` Ian Campbell
2013-09-12 12:42 ` [PATCH 4/7] xen/arm: cope with modules outside of "visible" RAM Ian Campbell
2013-09-12 12:42 ` [PATCH 5/7] xen: support RAM at addresses 0 and 4096 Ian Campbell
2013-09-12 13:25 ` Jan Beulich
2013-09-12 13:54 ` Ian Campbell
2013-09-13 11:20 ` Ian Campbell
2013-09-13 11:28 ` Keir Fraser [this message]
2013-09-12 12:42 ` [PATCH 6/7] xen/arm: Support dtb /memreserve/ regions Ian Campbell
2013-09-12 13:03 ` Julien Grall
2013-09-12 13:47 ` Ian Campbell
2013-09-12 12:42 ` [PATCH 7/7] xen/arm: rename boot misc region to boot reloc now it has a single purpose 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=CE584503.5DCD6%keir.xen@gmail.com \
--to=keir.xen@gmail.com \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=andre.przywara@linaro.org \
--cc=julien.grall@linaro.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).