[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 70/73] cpu: protect CPU state with cpu->lock
Re: [Qemu-devel] [PATCH v6 70/73] cpu: protect CPU state with cpu->lock instead of the BQL
Wed, 20 Feb 2019 09:25:00 -0800
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0
On 1/29/19 4:48 PM, Emilio G. Cota wrote:
> Use the per-CPU locks to protect the CPUs' state, instead of
> using the BQL. These locks are uncontended (they are mostly
> acquired by the corresponding vCPU thread), so acquiring them
> is cheaper than acquiring the BQL, which particularly in
> MTTCG can be contended at high core counts.
> In this conversion we drop qemu_cpu_cond and qemu_pause_cond,
> and use cpu->cond instead.
> In qom/cpu.c we can finally remove the ugliness that
> results from having to hold both the BQL and the CPU lock;
> now we just have to grab the CPU lock.
> Signed-off-by: Emilio G. Cota <address@hidden>
> include/qom/cpu.h | 20 ++--
> cpus.c | 280 ++++++++++++++++++++++++++++++++++------------
> qom/cpu.c | 29 +----
> 3 files changed, 225 insertions(+), 104 deletions(-)
Reviewed-by: Richard Henderson <address@hidden>