qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>, Greg Kurz <groug@kaod.org>,
	Thomas Huth <thuth@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] numa: set the memory backend "is_mapped" field
Date: Tue, 2 Aug 2016 15:20:41 -0400 (EDT)	[thread overview]
Message-ID: <993167571.13130523.1470165641483.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20160802180006.GM3337@thinpad.lan.raisama.net>



----- Original Message -----
> From: "Eduardo Habkost" <ehabkost@redhat.com>
> To: "Igor Mammedov" <imammedo@redhat.com>
> Cc: "Greg Kurz" <groug@kaod.org>, "Thomas Huth" <thuth@redhat.com>, qemu-devel@nongnu.org, pbonzini@redhat.com
> Sent: Tuesday, August 2, 2016 8:00:06 PM
> Subject: Re: [Qemu-devel] [PATCH] numa: set the memory backend "is_mapped" field
> 
> On Tue, Jul 19, 2016 at 12:07:53PM +0200, Igor Mammedov wrote:
> > On Tue, 19 Jul 2016 10:28:35 +0200
> > Greg Kurz <groug@kaod.org> wrote:
> > 
> > > Commit 2aece63 "hostmem: detect host backend memory is being used
> > > properly"
> > > added a way to know if a memory backend is busy or available for use. It
> > > caused a slight regression if we pass the same backend to a NUMA node and
> > > to a pc-dimm device:
> > > 
> > > -m 1G,slots=2,maxmem=2G \
> > > -object memory-backend-ram,size=1G,id=mem-mem1 \
> > > -device pc-dimm,id=dimm-mem1,memdev=mem-mem1 \
> > > -numa node,nodeid=0,memdev=mem-mem1
> > > 
> > > Before commit 2aece63, this would cause QEMU to print an error message
> > > and
> > > to exit gracefully:
> > > 
> > > qemu-system-ppc64: -device pc-dimm,id=dimm-mem1,memdev=mem-mem1:
> > >     can't use already busy memdev: mem-mem1
> > > 
> > > Since commit 2aece63, QEMU hits an assertion in the memory code:
> > > 
> > > qemu-system-ppc64: memory.c:1934: memory_region_add_subregion_common:
> > >     Assertion `!subregion->container' failed.
> > > Aborted
> > > 
> > > This happens because pc-dimm devices don't use memory_region_is_mapped()
> > > anymore and cannot guess the backend is already used by a NUMA node.
> > > 
> > > Let's revert to the previous behavior by turning the NUMA code to also
> > > call host_memory_backend_set_mapped() when it uses a backend.
> > > 
> > > Fixes: 2aece63c8a9d2c3a8ff41d2febc4cdeff2633331
> > > Signed-off-by: Greg Kurz <groug@kaod.org>
> > Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> 
> I have just noticed that this fell through the cracks, sorry.
> Applied to numa-next. Thanks!

Actually I am just finishing tests of a pull request that included it
(because I was the one that caused the regression).  Ok for me to just
handle this one patch?

Paolo

  reply	other threads:[~2016-08-02 19:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19  8:28 [Qemu-devel] [PATCH] numa: set the memory backend "is_mapped" field Greg Kurz
2016-07-19 10:07 ` Igor Mammedov
2016-08-02 18:00   ` Eduardo Habkost
2016-08-02 19:20     ` Paolo Bonzini [this message]
2016-08-02 20:08       ` Eduardo Habkost

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=993167571.13130523.1470165641483.JavaMail.zimbra@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=groug@kaod.org \
    --cc=imammedo@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@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).