From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Cc: Roy Franz <roy.franz@linaro.org>,
tim@xen.org, Fu Wei <fu.wei@linaro.org>,
stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH for-4.5 v2 2/2] xen: arm: Enable physical address space compression (PDX) on arm32
Date: Fri, 12 Sep 2014 16:00:20 -0700 [thread overview]
Message-ID: <54137B04.6080907@linaro.org> (raw)
In-Reply-To: <1410534923-17209-2-git-send-email-ian.campbell@citrix.com>
Hi Ian,
Don't you implement PDX for both arm32 and arm64? If so, you may need to
update the commit title.
The patch looks good to me. I have only few comments on it.
On 12/09/14 08:15, Ian Campbell wrote:
> This allows us to support sparse physical address maps which we previously
> could not because the frametable would end up taking up an enourmous fraction
enormous
[..]
> - memset(&frame_table[0], 0, nr_pages * sizeof(struct page_info));
> - memset(&frame_table[nr_pages], -1,
> - frametable_size - (nr_pages * sizeof(struct page_info)));
> + memset(&frame_table[0], 0, nr_pdxs * sizeof(struct page_info));
> + memset(&frame_table[nr_pdxs], -1,
> + frametable_size - (nr_pdxs * sizeof(struct page_info)));
> +
> + frametable_virt_end = FRAMETABLE_VIRT_START + (nr_pdxs * sizeof(struct page_info));
>
NIT: I don't think it's necessary to have a blank line before the end of
the block. I would drop it.
[..]
> +/* Sets all bits from the most-significant 1-bit down to the LSB */
> +static u64 __init fill_mask(u64 mask)
> +{
> + while (mask & (mask + 1))
> + mask |= mask + 1;
> + return mask;
> +}
The function is the same on x86. Shall we create an helper?
[..]
> setup_xenheap_mappings(bank_start>>PAGE_SHIFT, bank_size>>PAGE_SHIFT);
You forgot to drop check if ( bank != bootinfo.mem.nr_banks ) which, I
think, is not relevant anymore.
> diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h
> index 1c3abcf..59b2887 100644
> --- a/xen/include/asm-arm/config.h
> +++ b/xen/include/asm-arm/config.h
> @@ -126,7 +126,12 @@
> #define CONFIG_SEPARATE_XENHEAP 1
>
> #define FRAMETABLE_VIRT_START _AT(vaddr_t,0x02000000)
> -#define VMAP_VIRT_START _AT(vaddr_t,0x10000000)
> +#define FRAMETABLE_SIZE MB(128-32)
I would add a comment about why the frametable size is "MB(128-32)".
Regards,
--
Julien Grall
next prev parent reply other threads:[~2014-09-12 23:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-12 15:14 [PATCH for-4.5 v2 0/2] Support for sparse physical address space on ARM Ian Campbell
2014-09-12 15:15 ` [PATCH for-4.5 v2 1/2] xen: refactor physical address space compression support into common code Ian Campbell
2014-09-12 15:32 ` Jan Beulich
2014-09-12 15:35 ` Ian Campbell
2014-09-12 15:15 ` [PATCH for-4.5 v2 2/2] xen: arm: Enable physical address space compression (PDX) on arm32 Ian Campbell
2014-09-12 23:00 ` Julien Grall [this message]
2014-09-16 19:33 ` Ian Campbell
2014-09-16 20:49 ` Julien Grall
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=54137B04.6080907@linaro.org \
--to=julien.grall@linaro.org \
--cc=fu.wei@linaro.org \
--cc=ian.campbell@citrix.com \
--cc=roy.franz@linaro.org \
--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 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).