On Thu, May 30, 2019 at 05:40:38PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) 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 <pet...@redhat.com> > > 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 <dgilb...@redhat.com> Thanks, -- Peter Xu