qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 13/16] cpus-common: simplify locking for start_e


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 13/16] cpus-common: simplify locking for start_exclusive/end_exclusive
Date: Fri, 23 Sep 2016 10:25:18 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

On 09/23/2016 12:31 AM, Paolo Bonzini wrote:
It is not necessary to hold qemu_cpu_list_mutex throughout the
exclusive section, because no other exclusive section can run
while pending_cpus != 0.

exclusive_idle() is called in cpu_exec_start(), and that prevents
any CPUs created after start_exclusive() from entering cpu_exec()
during an exclusive section.

Signed-off-by: Paolo Bonzini <address@hidden>
---
 cpus-common.c              | 11 ++++++++---
 docs/tcg-exclusive.promela |  4 +++-
 include/qom/cpu.h          |  4 ----
 3 files changed, 11 insertions(+), 8 deletions(-)

Reviewed-by: Richard Henderson <address@hidden>


r~



reply via email to

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