From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: "Zhoujian (jay)" <jianjay.zhou@huawei.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"Huangweidong (C)" <weidong.huang@huawei.com>,
"Gonglei (Arei)" <arei.gonglei@huawei.com>,
"wangxin (U)" <wangxinxin.wang@huawei.com>,
"Liuzhe (Cloud Open Labs, NFV)" <gary.liuzhe@huawei.com>,
Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/2] vhost: two fixes
Date: Fri, 15 Dec 2017 09:24:34 +0000 [thread overview]
Message-ID: <20171215092434.GA2358@work-vm> (raw)
In-Reply-To: <B2D15215269B544CADD246097EACE7473AB03F26@DGGEMM505-MBS.china.huawei.com>
* Zhoujian (jay) (jianjay.zhou@huawei.com) wrote:
> Hi Dave,
>
> > -----Original Message-----
> > From: Dr. David Alan Gilbert [mailto:dgilbert@redhat.com]
> > Sent: Friday, December 15, 2017 3:49 AM
> > To: Michael S. Tsirkin <mst@redhat.com>
> > Cc: Zhoujian (jay) <jianjay.zhou@huawei.com>; qemu-devel@nongnu.org;
> > Huangweidong (C) <weidong.huang@huawei.com>; Gonglei (Arei)
> > <arei.gonglei@huawei.com>; wangxin (U) <wangxinxin.wang@huawei.com>;
> > Liuzhe (Cloud Open Labs, NFV) <gary.liuzhe@huawei.com>; Igor Mammedov
> > <imammedo@redhat.com>
> > Subject: Re: [PATCH 0/2] vhost: two fixes
> >
> > * Michael S. Tsirkin (mst@redhat.com) wrote:
> > > On Fri, Dec 15, 2017 at 12:36:30AM +0800, Jay Zhou wrote:
> > > > Jay Zhou (2):
> > > > vhost: add used memslot number for vhost-user
> > > > vhost: double check memslot number
> > > >
> > > > hw/virtio/vhost-user.c | 31 +++++++++++++++++++++++++
> > > > hw/virtio/vhost.c | 49
> > ++++++++++++++++++++++++++++++++++-----
> > > > include/hw/virtio/vhost-backend.h | 4 ++++
> > > > 3 files changed, 78 insertions(+), 6 deletions(-)
> > >
> > > Cc two developers working on these files right now.
> >
> > I have to admit to not understanding the 'used_memslots' variable.
> >
> > * It's a global in vhost.c
> > * but set by vhost_set_memory that's called from the listener associated
> > with each individual vhost
> > * While they're probably always the same, the merging code calls
> > the vhost_backend_can_merge method for each device, so the number
> > of regions can be different.
> >
>
> Your mean for some devices the new added MemoryRegionSection can be merged,
> but for others it can not be merged?
That's my understanding, because of the call to vhost_backend_can_merge
> IIUC the vhost_mem for each vhost_dev
> is the same.
>
> Meanwhile, I think it is more reasonable to add globals in vhost-backend.c
> and vhost-user.c respectively instead of 'used_memslots'. The reason
> is explained in patch 1. What do you think?
If we need globals I'm not sure it matters that much where they live.
Dave
> Regards,
> Jay
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
prev parent reply other threads:[~2017-12-15 9:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-14 16:36 [Qemu-devel] [PATCH 0/2] vhost: two fixes Jay Zhou
2017-12-14 16:36 ` [Qemu-devel] [PATCH 1/2] vhost: add used memslot number for vhost-user Jay Zhou
2017-12-14 16:36 ` [Qemu-devel] [PATCH 2/2] vhost: double check memslot number Jay Zhou
2017-12-14 18:27 ` [Qemu-devel] [PATCH 0/2] vhost: two fixes Michael S. Tsirkin
2017-12-14 19:49 ` Dr. David Alan Gilbert
2017-12-15 2:38 ` Zhoujian (jay)
2017-12-15 4:36 ` Michael S. Tsirkin
2017-12-15 4:51 ` Zhoujian (jay)
2017-12-15 6:06 ` Zhoujian (jay)
2017-12-15 9:24 ` Dr. David Alan Gilbert [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=20171215092434.GA2358@work-vm \
--to=dgilbert@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=gary.liuzhe@huawei.com \
--cc=imammedo@redhat.com \
--cc=jianjay.zhou@huawei.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=wangxinxin.wang@huawei.com \
--cc=weidong.huang@huawei.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 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.