qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 03/10] replace spinlock by QemuMutex.


From: Frederic Konrad
Subject: Re: [Qemu-devel] [PATCH 03/10] replace spinlock by QemuMutex.
Date: Fri, 28 Aug 2015 16:53:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 28/08/2015 16:49, Peter Maydell wrote:
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.

Seems Paolo forget to pick up the following patch from the mttcg tree:
"remove unused spinlock."
https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg01129.html

Thanks,
Fred
Otherwise
Reviewed-by: Peter Maydell <address@hidden>

thanks
-- PMM




reply via email to

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