Re: [PATCH v2] KVM: dirty ring: check if vcpu is created before dirty_ring_reap_one

2023-02-05 Thread Weinan Liu??????????
Hi, Peter, > IMHO that one will be more straightforward and self contained than this > one. What do you think? Yes, it is. > When posting new patches, please also remember to copy maintainers. For > this one, it's: Thanks for your suggestion. Weinan Liu

Re: [PATCH] KVM: dirty ring: check if vcpu is created before dirty_ring_reap_one

2023-02-04 Thread Weinan Liu
Sorry, this patch is wrong. kvm_dirty_ring_reap_locked holds slots_lock, which may result in deadlock at the moment when modifying memory_region. I am finding a better way to get known the finishing of all vcpus' creations before waking reaper up. > -原始邮件-----发件人:"Weinan Liu&

Re: [PATCH] KVM: dirty ring: check if vcpu is created before dirty_ring_reap_one

2023-02-04 Thread Weinan Liu
Sorry, this patch is wrong. kvm_dirty_ring_reap_locked holds slots_lock, which may result in deadlock at the moment when modifying memory_region. I am finding a better way to get known the finishing of all vcpus' creations before waking reaper up. > -原始邮件-----发件人:"Weinan Liu&

[PATCH v2] KVM: dirty ring: check if vcpu is created before dirty_ring_reap_one

2023-02-04 Thread Weinan Liu
n_do_io = 1; where dirty ring reaper will wakeup but then a vcpu has not been finished to create. Signed-off-by: Weinan Liu --- accel/kvm/kvm-all.c | 5 + 1 file changed, 5 insertions(+) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 7e6a6076b1..0070ad72b8 100644 --- a/ac

[PATCH] KVM: dirty ring: check if vcpu is created before dirty_ring_reap_one

2023-02-04 Thread Weinan Liu
From: Weinan Liu Failed to assert '(dirty_gfns && ring_size)' in kvm_dirty_ring_reap_one if the vcpu has not been finished to create yet. This bug occasionally occurs when I open 200+ qemu instances on my 16G 6-cores x86 machine. And it must be triggered if inserting