qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC 00/10] MultiThread TCG.


From: Mark Burton
Subject: Re: [Qemu-devel] [RFC 00/10] MultiThread TCG.
Date: Mon, 30 Mar 2015 08:52:09 +0200

to add some detail,
Unfortunately Fred is away this week, so we won’t get this patch set to you ask 
quickly as I’d have liked.

We have a ‘working’ implementation - where ‘working’ is limited to a couple of 
SMP cores, booting and running Dhrystone. The performance improvement we get is 
close to the 2x that you might expect (especially for such a simple test as 
Dhrystone). HOWEVER…

We still have the ‘hacked’ version of tb_first (if you remember, we have made 
that into an array, addressed by current_cpu). This has two effects (at least):
        1/ it’s probably un-necissary, but we DO need to protect cpu’s from 
each other when they invalidate tb_first (probably not when they write, as the 
current implementation only allows 1 thread to generate TB’s)
        2/ it breaks GDB as current_cpu isn’t set in the IO thread, so that 
just set-faults and dies…
We are in the process of working out how to fix this mess cleanly. 

So - Fred is unwilling to send the patch set as it stands, because frankly this 
part is totally broken.

There is an independent patch set that needs splitting out which deals with 
just the atomic instruction issue - specifically for ARM (though I guess it’s 
applicable across the board)…

So - in short - I HOPE to get the patch set onto the reflector sometime next 
week, and I’m sorry for the delay.

When we do send it - it will be sent RFC.
It is possible that we all agree that the atomic instruction fix is applicable, 
but the rest is almost certainly not. It’s there to show progress and the 
direction we’re going and give everybody a basis from which to discuss the 
issues…. not more.


Cheers

Mark.



> On 27 Mar 2015, at 11:37, Frederic Konrad <address@hidden> wrote:
> 
> Hi,
> 
> Yes a v2 will come soon.
> Actually I'm trying to unbreak GDB stub and a strange segfault with smp > 2.
> 
> Fred
> 
> On 27/03/2015 11:08, Alex Bennée wrote:
>> address@hidden writes:
>> 
>>> From: KONRAD Frederic <address@hidden>
>>> 
>>> Hi everybody,
>>> 
>>> This is the start of our work on TCG multithread.
>> It's been a while since the first RFC are we likely to see a v2 of the
>> patch series any time soon?
>> 
>>> We send it for comment to be sure we are taking the right direction.
>>> We already discussed the first patch but we keep it for simplicity.
>>> 
>>> We choice to keep a common tbs array for all VCPU but protect it with the
>>> tb_lock from TBContext. Then for each PageDesc we have a tb list per VCPU.
>>> 
>>> Known issues:
>>>   * Some random deadlock.
>>>   * qemu_pause_cond is broken we can't quit QEMU.
>>>   * tb_flush is broken we must make sure no VCPU are executing code.
>>> 
>>> Jan Kiszka (1):
>>>   Drop global lock during TCG code execution
>>> 
>>> KONRAD Frederic (9):
>>>   target-arm: protect cpu_exclusive_*.
>>>   use a different translation block list for each cpu.
>>>   replace spinlock by QemuMutex.
>>>   remove unused spinlock.
>>>   extract TBContext from TCGContext.
>>>   protect TBContext with tb_lock.
>>>   tcg: remove tcg_halt_cond global variable.
>>>   cpu: remove exit_request global.
>>>   tcg: switch on multithread.
>>> 
>>>  cpu-exec.c                |  47 +++++++----
>>>  cpus.c                    | 122 +++++++++++----------------
>>>  cputlb.c                  |   5 ++
>>>  exec.c                    |  25 ++++++
>>>  include/exec/exec-all.h   |   4 +-
>>>  include/exec/spinlock.h   |  49 -----------
>>>  include/qom/cpu.h         |   1 +
>>>  linux-user/main.c         |   6 +-
>>>  scripts/checkpatch.pl     |   9 +-
>>>  softmmu_template.h        |   6 ++
>>>  target-arm/cpu.c          |  14 ++++
>>>  target-arm/cpu.h          |   3 +
>>>  target-arm/helper.h       |   3 +
>>>  target-arm/op_helper.c    |  10 +++
>>>  target-arm/translate.c    |   6 ++
>>>  target-i386/mem_helper.c  |  16 +++-
>>>  target-i386/misc_helper.c |  27 +++++-
>>>  tcg/i386/tcg-target.c     |   8 ++
>>>  tcg/tcg.h                 |   3 +-
>>>  translate-all.c           | 208 
>>> +++++++++++++++++++++++++++-------------------
>>>  vl.c                      |   6 ++
>>>  21 files changed, 335 insertions(+), 243 deletions(-)
>>>  delete mode 100644 include/exec/spinlock.h
> 


         +44 (0)20 7100 3485 x 210
 +33 (0)5 33 52 01 77x 210

        +33 (0)603762104
        mark.burton




reply via email to

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