linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: benh@kernel.crashing.org, linux-mm@kvack.org,
	m.szyprowski@samsung.com, mina86@mina86.com,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH -V2 2/4] powerpc: Contiguous memory allocator based hash page allocation
Date: Sat, 29 Jun 2013 17:25:49 +1000	[thread overview]
Message-ID: <20130629072549.GC8687@iris.ozlabs.ibm.com> (raw)
In-Reply-To: <1372410662-3748-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com>

On Fri, Jun 28, 2013 at 02:41:00PM +0530, Aneesh Kumar K.V wrote:
> From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
> 
> 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@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2013-06-29  7:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-28  9:10 [PATCH -V2 1/4] mm/cma: Move dma contiguous changes into a seperate config Aneesh Kumar K.V
2013-06-28  9:11 ` [PATCH -V2 2/4] powerpc: Contiguous memory allocator based hash page allocation Aneesh Kumar K.V
2013-06-29  7:25   ` Paul Mackerras [this message]
2013-06-28  9:11 ` [PATCH -V2 3/4] powerpc: Contiguous memory allocator based RMA allocation Aneesh Kumar K.V
2013-06-29  7:28   ` Paul Mackerras
2013-06-28  9:11 ` [PATCH -V2 4/4] powerpc/kvm: Use 256K chunk to track both RMA and hash page table allocation Aneesh Kumar K.V
2013-06-29  7:43   ` Paul Mackerras
2013-06-29  7:14 ` [PATCH -V2 1/4] mm/cma: Move dma contiguous changes into a seperate config Paul Mackerras
2013-07-01 11:52 ` Michal Nazarewicz
2013-07-01 13:01   ` Aneesh Kumar K.V

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=20130629072549.GC8687@iris.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mina86@mina86.com \
    /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).