All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	marcandre.lureau@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Hotplug ram and vhost-user
Date: Thu, 7 Dec 2017 18:55:10 +0200	[thread overview]
Message-ID: <20171207185415-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <b4788fff-3b60-265b-7f61-af31fa8007b9@redhat.com>

On Thu, Dec 07, 2017 at 05:35:13PM +0100, Maxime Coquelin wrote:
> 
> 
> On 12/07/2017 04:56 PM, Michael S. Tsirkin wrote:
> > On Thu, Dec 07, 2017 at 04:52:18PM +0100, Maxime Coquelin wrote:
> > > Hi David,
> > > 
> > > On 12/05/2017 06:41 PM, Dr. David Alan Gilbert wrote:
> > > > Hi,
> > > >     Since I'm reworking the memory map update code I've been
> > > > trying to test it with hot adding RAM; but even on upstream
> > > > I'm finding that hot adding RAM causes the guest to stop passing
> > > > packets with vhost-user-bridge;  have either of you seen the same
> > > > thing?
> > > 
> > > No, I have never tried this.
> > > 
> > > > I'm doing:
> > > > ./tests/vhost-user-bridge -u /tmp/vubrsrc.sock
> > > > $QEMU -enable-kvm -m 1G,maxmem=2G,slots=4 -smp 2 -object memory-backend-file,id=mem,size=1G,mem-path=/dev/shm,share=on -numa node,memdev=mem -mem-prealloc -trace events=vhost-trace-file -chardev socket,id=char0,path=/tmp/vubrsrc.sock -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce -device virtio-net-pci,netdev=mynet1 $IMAGE -net none
> > > > 
> > > > (with a f27 guest) and then doing:
> > > > (qemu) object_add memory-backend-file,id=mem1,size=256M,mem-path=/dev/shm
> > > > (qemu) device_add pc-dimm,id=dimm1,memdev=mem1
> > > > 
> > > > but then not getting any responses inside the guest.
> > > > 
> > > > I can see the code sending another set-mem-table with the
> > > > extra chunk of RAM and fd, and I think I can see the bridge
> > > > mapping it.
> > > 
> > > I think there are at least two problems.
> > > The first one is that vhost-user-bridge does not support vhost-user
> > > protocol's reply-ack feature. So when QEMU sends the requests, it cannot
> > > know whether/when it has been handled by the backend.
> > > 
> > > It had been fixed by sending a GET_FEATURE requests to be sure the
> > > SET_MEM_TABLE was handled, as messages are processed in order. The problem
> > > is that it caused some test failures when using TCG, so it got
> > > reverted.
> > > 
> > > The initial fix:
> > > 
> > > commit 28ed5ef16384f12500abd3647973ee21b03cbe23
> > > Author: Prerna Saxena <prerna.saxena@nutanix.com>
> > > Date:   Fri Aug 5 03:53:51 2016 -0700
> > > 
> > >      vhost-user: Attempt to fix a race with set_mem_table.
> > > 
> > > The revert:
> > > 
> > > commit 94c9cb31c04737f86be29afefbff401cd23bc24d
> > > Author: Michael S. Tsirkin <mst@redhat.com>
> > > Date:   Mon Aug 15 16:35:24 2016 +0300
> > > 
> > >      Revert "vhost-user: Attempt to fix a race with set_mem_table."
> > 
> > It's a question of stress-testing it and finding out why did
> > it cause tests fail esp when run within a container.
> 
> Actually I did work on fixing it last year, and proposed below series:
> http://lists.gnu.org/archive/html/qemu-devel/2016-09/msg01704.html
> 
> It felt through the cracks though. Maybe we could just revert your
> revert (patch 1 of my series) now that TCG is no more used by vhost-
> user-test?
> 
> Maxime

TCG just changed timing making races more obvious.
And it's still used on many ci systems.

> > > 
> > > Another problem is that memory mmapped with previous call does not seems
> > > to be unmapped, but that should not cause other problems than leaking
> > > virtual memory.
> > > 
> > > Maxime
> > > > Dave
> > > > 
> > > > --
> > > > Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
> > > > 

  reply	other threads:[~2017-12-07 16:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-05 17:41 [Qemu-devel] Hotplug ram and vhost-user Dr. David Alan Gilbert
2017-12-07 15:52 ` Maxime Coquelin
2017-12-07 15:56   ` Michael S. Tsirkin
2017-12-07 16:35     ` Maxime Coquelin
2017-12-07 16:55       ` Michael S. Tsirkin [this message]
2017-12-07 16:56       ` Michael S. Tsirkin
2017-12-07 16:25   ` Dr. David Alan Gilbert
2017-12-07 16:42     ` Maxime Coquelin
2017-12-07 18:23       ` Dr. David Alan Gilbert
2017-12-07 18:33         ` Maxime Coquelin
2017-12-07 18:57           ` Dr. David Alan Gilbert

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=20171207185415-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=maxime.coquelin@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.