All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linhaifeng <haifeng.lin@huawei.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: milo.raofei@huawei.com, arei.gonglei@huawei.com,
	jerry.lilijun@huawei.com, n.nikolaev@virtualopensystems.com,
	mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH v1] vhost-user: fix not send all hugepage files to vhost-user
Date: Sun, 15 Feb 2015 20:07:54 +0800	[thread overview]
Message-ID: <54E08C1A.5050804@huawei.com> (raw)
In-Reply-To: <54CEB6EB.1090202@redhat.com>



On 2015/2/2 7:29, Paolo Bonzini wrote:
> 
> 
> On 17/12/2014 07:02, haifeng.lin@huawei.com wrote:
>> From: linhaifeng <haifeng.lin@huawei.com>
>>
>> If we create VM with two or more numa nodes qemu will create two
>> or more hugepage files but qemu only send one hugepage file fd
>> to vhost-user when VM's memory size is 2G and with two numa nodes.
>>
>> Signed-off-by: linhaifeng <haifeng.lin@huawei.com>
> 
> The bug is in vhost_dev_assign_memory.  It doesn't check that the file
> descriptor matches when merging regions.  Michael, does the merging
> trigger in practice?  Can we just eliminate it?
> 
> Paolo
> 

qemu-system-x86_64 -name vm1 -enable-kvm -smp 2 -m 2048 -object memory-backend-file,id=mem1,size=1024M,mem-path=/dev/hugepages,share=on -object memory-backend-file,id=mem2,size=1024M,mem-path=/dev/hugepages,share=on -numa node,memdev=mem1 -numa node,memdev=mem2 -chardev socket,id=chr0,path=/var/run/vhost-user/tap10  -netdev type=vhost-user,id=net0,chardev=chr0,vhostforce -device virtio-net-pci,netdev=net0,mac=00:00:00:00:00:01,csum=off,gso=off,guest_tso4=off,guest_tso6=off,guest_ecn=off -drive file=/mnt/sdc/linhf/suse11_sp3_64_0 -vnc :0
hugepage file fd=8 addr=0x7f1ea7200000 size=1073741824
hugepage file fd=9 addr=0x7f1ee7200000 size=1073741824
qemu-system-x86_64: -netdev type=vhost-user,id=net0,chardev=chr0,vhostforce: chardev "chr0" went up

WARNING: Image format was not specified for '/mnt/sdc/linhf/suse11_sp3_64_0' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
reg->userspace_addr=0x7f1ea72c0000 ram_addr=0xc0000 fd=8
reg->userspace_addr=0x7f1e9ee00000 ram_addr=0x80000000 fd=-1
reg->userspace_addr=0x7f1ea7200000 ram_addr=0x0 fd=8


It seems like the second region's address is invalid(not in the hugepage's area).
so we lost this region.

      parent reply	other threads:[~2015-02-15 12:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-17  6:02 [Qemu-devel] [PATCH v1] vhost-user: fix not send all hugepage files to vhost-user haifeng.lin
2014-12-18  5:06 ` Linhaifeng
2015-01-29  3:58   ` Linhaifeng
2015-01-29 10:51     ` Michael S. Tsirkin
2015-01-29 13:02       ` Linhaifeng
2015-02-01 23:29 ` Paolo Bonzini
2015-02-03 13:09   ` Linhaifeng
2015-02-04 13:52   ` Michael S. Tsirkin
2015-02-04 14:02     ` Paolo Bonzini
2015-02-15 12:07   ` Linhaifeng [this message]

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=54E08C1A.5050804@huawei.com \
    --to=haifeng.lin@huawei.com \
    --cc=arei.gonglei@huawei.com \
    --cc=jerry.lilijun@huawei.com \
    --cc=milo.raofei@huawei.com \
    --cc=mst@redhat.com \
    --cc=n.nikolaev@virtualopensystems.com \
    --cc=pbonzini@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.