Re: [PATCH -V2 2/4] powerpc: Contiguous memory allocator based hash page allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 28, 2013 at 02:41:00PM +0530, Aneesh Kumar K.V wrote:
> From: "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxxxxxxxxxx>
> 
> Use CMA for allocation of guest hash page.

"page table" not just "page".  This patch description seems a bit
brief for a patch of this length.  Please describe a little more of
the motivation and the design decisions.

> +	if (selected_size) {
> +		pr_debug("%s: reserving %ld MiB for global area\n", __func__,
> +			 (unsigned long)selected_size / SZ_1M);
> +		align_size = hpt_align_pages << PAGE_SHIFT;
> +		kvm_cma_declare_contiguous(selected_size, align_size);

The alignment you declare here has to be at least as large as the
largest alignment that we will be requesting for any block later on.
This alignment is fine for POWER7, but PPC970 requires the HPT to be
aligned on a multiple of its size.  For PPC970 we should make sure
align_size is at least as large as any block that we could allocate.
Thus align_size should be at least __rounddown_pow_of_two(selected_size)
for PPC970.

Paul.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]