All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: Andrea Arcangeli <aarcange@redhat.com>
Cc: qemu-devel@nongnu.org, Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH QEMU] Transparent Hugepage Support #3
Date: Wed, 17 Mar 2010 15:21:26 +0000	[thread overview]
Message-ID: <201003171521.26911.paul@codesourcery.com> (raw)
In-Reply-To: <20100317151401.GB5752@random.random>

> On Wed, Mar 17, 2010 at 03:05:57PM +0000, Paul Brook wrote:
> > > +       if (size >= PREFERRED_RAM_ALIGN)
> > > +               new_block->host = qemu_memalign(PREFERRED_RAM_ALIGN,
> > > size);
> >
> > Is this deliberately bigger-than rather than multiple-of?
> > Having the size not be a multiple of alignment seems somewhat strange,
> > it's always going to be wrong at one end...
> 
> Size not multiple I think is legitimate, the below-4G chunk isn't
> required to end 2M aligned, all it matters is that the above-4G then
> starts aligned. In short one thing to add in the future as parameter
> to qemu_ram_alloc is the physical address that the host virtual
> address corresponds to.

In general you don't know this at allocation time.

> The guest physical address that the host
> retval corresponds to, has to be aligned with PREFERRED_RAM_ALIGN for
> NPT/EPT to work. I don't think it's a big concern right now.
 
If you allocating chinks that are multiples of the relevant page size, then I 
don't think you can expect anything particularly sensible to happen.

Paul

  reply	other threads:[~2010-03-17 15:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-17 14:59 [Qemu-devel] [PATCH QEMU] Transparent Hugepage Support #3 Andrea Arcangeli
2010-03-17 15:05 ` Paul Brook
2010-03-17 15:14   ` Andrea Arcangeli
2010-03-17 15:21     ` Paul Brook [this message]
2010-03-17 15:35       ` Andrea Arcangeli
2010-03-17 15:52         ` Paul Brook
2010-03-17 15:55           ` Andrea Arcangeli
2010-03-17 16:07             ` Paul Brook
2010-03-17 16:23               ` Andrea Arcangeli

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=201003171521.26911.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=aarcange@redhat.com \
    --cc=avi@redhat.com \
    --cc=qemu-devel@nongnu.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.