[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] vhost-user: add separate memslot counter for vhost-user
From: |
Raphael Norwitz |
Subject: |
Re: [PATCH] vhost-user: add separate memslot counter for vhost-user |
Date: |
Tue, 13 Oct 2020 20:58:59 -0400 |
On Tue, Oct 6, 2020 at 5:48 AM Igor Mammedov <imammedo@redhat.com> wrote:
>
> On Mon, 28 Sep 2020 21:17:31 +0800
> Jiajun Chen <chenjiajun8@huawei.com> wrote:
>
> > Used_memslots is equal to dev->mem->nregions now, it is true for
> > vhost kernel, but not for vhost user, which uses the memory regions
> > that have file descriptor. In fact, not all of the memory regions
> > have file descriptor.
> > It is usefully in some scenarios, e.g. used_memslots is 8, and only
> > 5 memory slots can be used by vhost user, it is failed to hot plug
> > a new memory RAM because vhost_has_free_slot just returned false,
> > but we can hot plug it safely in fact.
>
> I had an impression that all guest RAM has to be shared with vhost,
> so combination of anon and fd based RAM couldn't work.
> Am I wrong?
I'm not sure about the kernel backend, but I've tested adding anon
memory to a VM with a vhost-user-scsi device and it works (eventually
the VM crashed, but I could see the guest recognized the anon RAM).
The vhost-user code is designed to work with both. I'm not sure I see
a use case, but if there is one, this would be a valid issue. Maybe
Jiajun or Jianjay can elaborate.
>
> >
> > --
> > ChangeList:
> > v3:
> > -make used_memslots a member of struct vhost_dev instead of a global static
> > value
> it's global resource, so why?
I suggested it because I thought it made the code a little cleaner.
I'm not opposed to changing it back, or having it stored at the
vhost_user level.
- Re: [PATCH] vhost-user: add separate memslot counter for vhost-user, Raphael Norwitz, 2020/10/01
- Re: [PATCH] vhost-user: add separate memslot counter for vhost-user, Igor Mammedov, 2020/10/06
- Re: [PATCH] vhost-user: add separate memslot counter for vhost-user,
Raphael Norwitz <=
- Re: [PATCH] vhost-user: add separate memslot counter for vhost-user, Michael S. Tsirkin, 2020/10/14
- Re: [PATCH] vhost-user: add separate memslot counter for vhost-user, Raphael Norwitz, 2020/10/14
- Re: [PATCH] vhost-user: add separate memslot counter for vhost-user, Michael S. Tsirkin, 2020/10/14
- Re: [PATCH] vhost-user: add separate memslot counter for vhost-user, Raphael Norwitz, 2020/10/14
- Re: [PATCH] vhost-user: add separate memslot counter for vhost-user, Michael S. Tsirkin, 2020/10/14
- Re: [PATCH] vhost-user: add separate memslot counter for vhost-user, Igor Mammedov, 2020/10/21
Re: [PATCH] vhost-user: add separate memslot counter for vhost-user, Michael S. Tsirkin, 2020/10/30