[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question on memory commit during MR finalize()
From: |
Paolo Bonzini |
Subject: |
Re: Question on memory commit during MR finalize() |
Date: |
Mon, 20 Apr 2020 23:44:11 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
On 20/04/20 23:00, Peter Xu wrote:
>
> I'm still uncertain how the dirty ring branch can easily trigger this, however
> the backtrace looks really odd to me in that we're going to do memory commit
> and even sending KVM ioctls during finalize(), especially in the RCU thread...
> I never expected that.
Short answer: it is really hard to not trigger finalize() from an RCU
callback, and it's the reason why the RCU thread takes the big QEMU lock.
However, instead of memory_region_transaction_commit,
memory_region_finalize probably should do something like
--memory_region_transaction_depth;
assert (memory_region_transaction_depth ||
(!memory_region_update_pending &&
!ioeventfd_update_pending));
Paolo