[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 10/12] kvm: Introduce slots lock for memory l
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH v3 10/12] kvm: Introduce slots lock for memory listener |
Date: |
Fri, 31 May 2019 10:48:08 +0800 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Thu, May 30, 2019 at 05:40:38PM +0100, Dr. David Alan Gilbert wrote:
> * Peter Xu (address@hidden) wrote:
> > Introduce KVMMemoryListener.slots_lock to protect the slots inside the
> > kvm memory listener. Currently it is close to useless because all the
> > KVM code path now is always protected by the BQL. But it'll start to
> > make sense in follow up patches where we might do remote dirty bitmap
> > clear and also we'll update the per-slot cached dirty bitmap even
> > without the BQL. So let's prepare for it.
> >
> > We can also use per-slot lock for above reason but it seems to be an
> > overkill. Let's just use this bigger one (which covers all the slots
> > of a single address space) but anyway this lock is still much smaller
> > than the BQL.
> >
> > Signed-off-by: Peter Xu <address@hidden>
>
> No one ever frees it? Huh OK, in that case if no one ever frees the
> listener then I guess you don't need to cleanup the lock.
Yeh not the first time I see something keeps forever in QEMU (in most
cases which won't hurt :).
I'll just leave it to the patch where all things are cleaned up.
> Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Thanks,
--
Peter Xu
- Re: [Qemu-devel] [PATCH v3 06/12] memory: Pass mr into snapshot_and_clear_dirty, (continued)
- [Qemu-devel] [PATCH v3 07/12] memory: Introduce memory listener hook log_clear(), Peter Xu, 2019/05/30
- [Qemu-devel] [PATCH v3 08/12] kvm: Update comments for sync_dirty_bitmap, Peter Xu, 2019/05/30
- [Qemu-devel] [PATCH v3 09/12] kvm: Persistent per kvmslot dirty bitmap, Peter Xu, 2019/05/30
- [Qemu-devel] [PATCH v3 10/12] kvm: Introduce slots lock for memory listener, Peter Xu, 2019/05/30
- [Qemu-devel] [PATCH v3 11/12] kvm: Support KVM_CLEAR_DIRTY_LOG, Peter Xu, 2019/05/30
- [Qemu-devel] [PATCH v3 12/12] migration: Split log_clear() into smaller chunks, Peter Xu, 2019/05/30