qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, pbonzini@redhat.com, quintela@redhat.com,
	amit.shah@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/2] migration/postcopy: Explicitly disallow huge pages
Date: Wed, 5 Oct 2016 10:54:31 +0100	[thread overview]
Message-ID: <20161005095431.GC2036@work-vm> (raw)
In-Reply-To: <20160930080944.GB17928@redhat.com>

* Daniel P. Berrange (berrange@redhat.com) wrote:
> On Thu, Sep 29, 2016 at 08:09:38PM +0100, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> > 
> > At the moment postcopy will fail as soon as qemu tries to register
> > userfault on the RAMBlock pages that are backed by hugepages.
> > However, the kernel is going to get userfault support for hugepage
> > at some point, and we've not got the rest of the QEMU code to support
> > it yet, so fail neatly with an error like:
> > 
> > Postcopy doesn't support hugetlbfs yet (/objects/mem1)
> > 
> > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> > ---
> >  migration/postcopy-ram.c | 23 +++++++++++++++++++++++
> >  1 file changed, 23 insertions(+)
> > 
> > diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
> > index 9b04778..9723593 100644
> > --- a/migration/postcopy-ram.c
> > +++ b/migration/postcopy-ram.c
> > @@ -85,6 +85,23 @@ static bool ufd_version_check(int ufd)
> >  }
> >  
> >  /*
> > + * Check for things that postcopy won't support; returns 0 if the block
> > + * is fine.
> > + */
> > +static int check_range(const char *block_name, void *host_addr,
> > +                      ram_addr_t offset, ram_addr_t length, void *opaque)
> > +{
> > +    RAMBlock *rb = qemu_ram_block_by_name(block_name);
> > +
> > +    if (qemu_ram_pagesize(rb) > getpagesize()) {
> > +        error_report("Postcopy doesn't support hugetlbfs yet (%s)", block_name);
> 
> A small nitpick - I'd suggest  s/hugetlbfs/large page sizes/ as this error
> will ultimately bubble up to users, and 'large page sizes' is the conceptual
> feature

Interesting, I'd never heard it called 'large' before.
Everytime I just say 'huge page' to someone I then have to explain it's fine
on transparent huge page.

Dave

> 
> 
> Regards,
> Daniel
> -- 
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org              -o-             http://virt-manager.org :|
> |: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2016-10-05  9:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-29 19:09 [Qemu-devel] [PATCH 0/2] Migration/postcopy disallow huge pages Dr. David Alan Gilbert (git)
2016-09-29 19:09 ` [Qemu-devel] [PATCH 1/2] RAMBlocks: Store page size Dr. David Alan Gilbert (git)
2016-09-29 19:09 ` [Qemu-devel] [PATCH 2/2] migration/postcopy: Explicitly disallow huge pages Dr. David Alan Gilbert (git)
2016-09-30  8:09   ` Daniel P. Berrange
2016-10-05  9:54     ` Dr. David Alan Gilbert [this message]
2016-10-05 10:02     ` Juan Quintela

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=20161005095431.GC2036@work-vm \
    --to=dgilbert@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=berrange@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.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).