All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: Alexander Graf <agraf@suse.de>
Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH 0/3] KVM: PPC: Book3S HV: More flexible allocator for linear memory
Date: Fri, 14 Sep 2012 18:11:40 +1000	[thread overview]
Message-ID: <20120914081140.GC15028@bloggs.ozlabs.ibm.com> (raw)
In-Reply-To: <9650229C-2512-4684-98EC-6E252E47C4A9@suse.de>

On Fri, Sep 14, 2012 at 01:32:23AM +0200, Alexander Graf wrote:
> 
> On 12.09.2012, at 02:34, Paul Mackerras wrote:
> 
> > This series of 3 patches makes it possible for guests to allocate
> > whatever size of HPT they need from linear memory preallocated at
> > boot, rather than being restricted to a single size of HPT (by
> > default, 16MB) and having to use the kernel page allocator for
> > anything else -- which in practice limits them to at most 16MB given
> > the default value for the maximum page order.  Instead of allocating
> > many individual pieces of memory, this allocates a single contiguous
> > area and uses a simple bitmap-based allocator to hand out pieces of it
> > as required.
> 
> Have you tried to play with CMA for this? It sounds like it could buy us exactly what we need.

Interesting, I hadn't noticed that there.  I had a bit of a look at
it, and it's certainly in the right general direction, however it
would need some changes to do what we need.  It limits the alignment
to at most 512 pages, i.e. 2MB with 4k pages or 32MB with 64k pages,
but we need RMAs of 64MB to 256MB for PPC970 and they have to be
aligned on their size, as do the HPTs for PPC970.

Secondly, it has a link with the page allocator that I don't fully
understand, but it seems from the comments in alloc_contig_range()
(mm/page_alloc.c) that you can allocate at most MAX_ORDER_NR_PAGES
pages at once, and that defaults to 16MB for ppc64, which isn't nearly
enough.  If that's true then it would make it unusable for this.

Paul.

WARNING: multiple messages have this Message-ID (diff)
From: Paul Mackerras <paulus@samba.org>
To: Alexander Graf <agraf@suse.de>
Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH 0/3] KVM: PPC: Book3S HV: More flexible allocator for linear memory
Date: Fri, 14 Sep 2012 08:11:40 +0000	[thread overview]
Message-ID: <20120914081140.GC15028@bloggs.ozlabs.ibm.com> (raw)
In-Reply-To: <9650229C-2512-4684-98EC-6E252E47C4A9@suse.de>

On Fri, Sep 14, 2012 at 01:32:23AM +0200, Alexander Graf wrote:
> 
> On 12.09.2012, at 02:34, Paul Mackerras wrote:
> 
> > This series of 3 patches makes it possible for guests to allocate
> > whatever size of HPT they need from linear memory preallocated at
> > boot, rather than being restricted to a single size of HPT (by
> > default, 16MB) and having to use the kernel page allocator for
> > anything else -- which in practice limits them to at most 16MB given
> > the default value for the maximum page order.  Instead of allocating
> > many individual pieces of memory, this allocates a single contiguous
> > area and uses a simple bitmap-based allocator to hand out pieces of it
> > as required.
> 
> Have you tried to play with CMA for this? It sounds like it could buy us exactly what we need.

Interesting, I hadn't noticed that there.  I had a bit of a look at
it, and it's certainly in the right general direction, however it
would need some changes to do what we need.  It limits the alignment
to at most 512 pages, i.e. 2MB with 4k pages or 32MB with 64k pages,
but we need RMAs of 64MB to 256MB for PPC970 and they have to be
aligned on their size, as do the HPTs for PPC970.

Secondly, it has a link with the page allocator that I don't fully
understand, but it seems from the comments in alloc_contig_range()
(mm/page_alloc.c) that you can allocate at most MAX_ORDER_NR_PAGES
pages at once, and that defaults to 16MB for ppc64, which isn't nearly
enough.  If that's true then it would make it unusable for this.

Paul.

  reply	other threads:[~2012-09-14  8:11 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12  0:34 [PATCH 0/3] KVM: PPC: Book3S HV: More flexible allocator for linear memory Paul Mackerras
2012-09-12  0:34 ` Paul Mackerras
2012-09-12  0:35 ` [PATCH 1/3] KVM: PPC: Book3S HV: Add a more " Paul Mackerras
2012-09-12  0:35   ` Paul Mackerras
2012-09-12  0:36 ` [PATCH 2/3] KVM: PPC: Book3S HV: Allocate user-requested size of HPT from preallocated pool Paul Mackerras
2012-09-12  0:36   ` Paul Mackerras
2012-09-12  0:36 ` [PATCH 3/3] KVM: PPC: Book3S HV: Add command-line option for amount of KVM linear memory Paul Mackerras
2012-09-12  0:36   ` Paul Mackerras
2012-09-13 23:32 ` [PATCH 0/3] KVM: PPC: Book3S HV: More flexible allocator for " Alexander Graf
2012-09-13 23:32   ` Alexander Graf
2012-09-14  8:11   ` Paul Mackerras [this message]
2012-09-14  8:11     ` Paul Mackerras
2012-09-14 12:13     ` Alexander Graf
2012-09-14 12:13       ` Alexander Graf
2012-09-14 12:13       ` Alexander Graf
2012-09-14 12:45       ` Paul Mackerras
2012-09-14 12:45         ` Paul Mackerras
2012-09-14 12:45         ` Paul Mackerras
2012-09-14 13:15         ` Alexander Graf
2012-09-14 13:15           ` Alexander Graf
2012-09-14 13:15           ` Alexander Graf
2012-10-26  1:17           ` Paul Mackerras
2012-10-26  1:17             ` Paul Mackerras
2012-10-26  1:17             ` Paul Mackerras
2012-10-30  9:12             ` Alexander Graf
2012-10-30  9:12               ` Alexander Graf
2012-10-30  9:12               ` Alexander Graf

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=20120914081140.GC15028@bloggs.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.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.