qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 00/17] tcg: tb_lock removal redux v3


From: Emilio G. Cota
Subject: Re: [Qemu-devel] [PATCH v3 00/17] tcg: tb_lock removal redux v3
Date: Fri, 1 Jun 2018 20:29:05 -0400
User-agent: Mutt/1.5.24 (2015-08-30)

On Wed, May 30, 2018 at 16:05:14 -0700, Richard Henderson wrote:
> On 05/30/2018 03:46 PM, Richard Henderson wrote:
> > Thanks.  Queued to tcg-next.
> Hmph.  Unqueued, at least for now.
> 
> ERROR:/home/rth/work/qemu/qemu/accel/tcg/translate-all.c:615:page_unlock__debug:
> assertion failed: (page_is_locked(pd))

Gaah, sorry. In v3 forgot to call the lock__debug function from
a successful trylock. I tested v3 on aarch64, which explains why
I didn't catch the bug. Fixed now:

--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -704,6 +704,7 @@ static bool page_entry_trylock(struct page_entry *pe)
     if (!busy) {
         g_assert(!pe->locked);
         pe->locked = true;
+        page_lock__debug(pe->pd);
     }
     return busy;
 }

I also added the following, which cannot hurt:

diff --git a/exec.c b/exec.c
index afc37e0..e874d67 100644
--- a/exec.c
+++ b/exec.c
@@ -2493,6 +2493,7 @@ void memory_notdirty_write_complete(NotDirtyInfo *ndi)
 {
     if (ndi->pages) {
         page_collection_unlock(ndi->pages);
+        ndi->pages = NULL;
     }

(Note that calling page_collection_unlock twice on that pointer
would blow up.)

The above two one-liners are the only code changes between v3 and v4.
I also added Alex's R-b tag for the qht patch.

I've boot-tested v4 on aarch64, arm, x86_64-softmmu, riscv64, sh4,
sparc, s390x, ppc64 and or1k, with and without TCG debug.

You can fetch v4 from:
  https://github.com/cota/qemu/tree/tb-lock-removal-redux-v4

Thanks,

                Emilio




reply via email to

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