qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 3/6] memory: Introduce memory_region_transaction_do_commit


From: Chuang Xu
Subject: Re: [PATCH v7 3/6] memory: Introduce memory_region_transaction_do_commit()
Date: Mon, 13 Mar 2023 10:53:11 +0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.7.2

Hi, Peter,

On 2023/3/10 下午10:51, Peter Xu wrote:
On Fri, Mar 10, 2023 at 10:24:22AM +0800, Chuang Xu wrote:
Split memory_region_transaction_do_commit() from
memory_region_transaction_commit().

We'll call do_commit() in address_space_to_flatview() in the later patch.

Signed-off-by: Chuang Xu <xuchuangxclwt@bytedance.com>
[...]

+void memory_region_transaction_commit(void)
+{
+    assert(memory_region_transaction_depth);
+    assert(qemu_mutex_iothread_locked());
This context has nothing to assert BQL, so this can be dropped I think (you
have one in do_commit).

do_commit() will be triggered only when depth is 0. Before do_commit() is
triggered, we must ensure that the BQL is held when the depth is modified.

+
+    --memory_region_transaction_depth;
+    if (!memory_region_transaction_depth) {
+        memory_region_transaction_do_commit();
+    }
  }
With above dropped:

Reviewed-by: Peter Xu <peterx@redhat.com>

Thanks!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]