[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 03/10] replace spinlock by QemuMutex.
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 03/10] replace spinlock by QemuMutex. |
Date: |
Fri, 28 Aug 2015 15:49:58 +0100 |
On 12 August 2015 at 17:40, Paolo Bonzini <address@hidden> wrote:
> From: KONRAD Frederic <address@hidden>
>
> spinlock is only used in two cases:
> * cpu-exec.c: to protect TranslationBlock
> * mem_helper.c: for lock helper in target-i386 (which seems broken).
>
> It's a pthread_mutex_t in user-mode so better using QemuMutex directly in this
> case.
> It allows as well to reuse tb_lock mutex of TBContext in case of multithread
> TCG.
The line wrapping in this commit message (and the grammar) looks a bit off...
> Signed-off-by: KONRAD Frederic <address@hidden>
> Message-Id: <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> cpu-exec.c | 15 +++------------
> include/exec/exec-all.h | 4 ++--
> linux-user/main.c | 6 +++---
> target-i386/cpu.h | 3 +++
> target-i386/mem_helper.c | 25 ++++++++++++++++++++++---
> target-i386/translate.c | 2 ++
> tcg/tcg.h | 4 ++++
> translate-all.c | 34 ++++++++++++++++++++++++++++++++++
> 8 files changed, 73 insertions(+), 20 deletions(-)
After this commit it looks like we have no users of spinlock_t
at all. It would be good to have a followup patch which deleted
include/exec/spinlock.h.
Otherwise
Reviewed-by: Peter Maydell <address@hidden>
thanks
-- PMM
- Re: [Qemu-devel] [PATCH 02/10] cpus: remove tcg_halt_cond global variable., (continued)
[Qemu-devel] [PATCH 07/10] tcg: comment on which functions have to be called with mmap_lock held, Paolo Bonzini, 2015/08/12
[Qemu-devel] [PATCH 01/10] cpus: protect work list with work_mutex, Paolo Bonzini, 2015/08/12
[Qemu-devel] [PATCH 08/10] tcg: add memory barriers in page_find_alloc accesses, Paolo Bonzini, 2015/08/12