[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 00/11] Reduce lock contention on TCG hot-path
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH v3 00/11] Reduce lock contention on TCG hot-path |
Date: |
Thu, 14 Jul 2016 10:55:03 +0100 |
User-agent: |
mu4e 0.9.17; emacs 25.0.95.9 |
Sergey Fedorov <address@hidden> writes:
> On 13/07/16 10:39, Paolo Bonzini wrote:
>> On 12/07/2016 22:13, Sergey Fedorov wrote:
>>> From: Sergey Fedorov <address@hidden>
>>>
>>> Hi,
>>>
>>> This is my respin of Alex's v2 series [1].
>>>
>>> The first 8 patches are preparation for the patch 9, the subject matter
>>> of this series, which enables lockless translation block lookup. The
>>> main change here is that Paolo's suggestion is implemented: TBs are
>>> marked with invalid CPU state early during invalidation. This allows to
>>> make lockless lookup safe from races on 'tb_jmp_cache' and direct block
>>> chaining.
>> Thanks for looking at the suggestion again and especially for perfecting it!
>>
>>> The patch 10 is a simple solution to avoid unnecessary bouncing on
>>> 'tb_lock' between tb_gen_code() and tb_add_jump(). A local variable is
>>> used to keep track of whether 'tb_lock' has already been taken.
>>>
>>> The last patch is my attempt to restructure tb_find_{fast,slow}() into a
>>> single function tb_find(). I think it will be easier to follow the
>>> locking scheme this way. However, I am afraid this last patch can be
>>> controversial, so it can be simply dropped.
>> Actually I agree entirely with it.
>>
>> If anything, for historical reasons one might rename tb_find_physical to
>> tb_find_slow and leave the tb_find_fast name, but I think the patch is
>> good as is.
>
> Nice to hear that :)
>
>>
>> Have you measured performance with the series? In any case, it's nice
>> to see MTTCG finally taking shape!
>
> No, I didn't measured the performance. Maybe Alex can help me with
> this?
I can run some tests against this series if you want. It's fairly easy
to see an improvement when watching htop though as the system time usage
drops a lot.
>
> Thanks,
> Sergey
--
Alex Bennée
- Re: [Qemu-devel] [PATCH v3 06/11] tcg: Introduce tb_mark_invalid() and tb_is_invalid(), (continued)
[Qemu-devel] [PATCH v3 11/11] tcg: Merge tb_find_slow() and tb_find_fast(), Sergey Fedorov, 2016/07/12
[Qemu-devel] [PATCH v3 10/11] tcg: Avoid bouncing tb_lock between tb_gen_code() and tb_add_jump(), Sergey Fedorov, 2016/07/12
Re: [Qemu-devel] [PATCH v3 00/11] Reduce lock contention on TCG hot-path, Paolo Bonzini, 2016/07/13
Re: [Qemu-devel] [PATCH v3 00/11] Reduce lock contention on TCG hot-path, Sergey Fedorov, 2016/07/13
Re: [Qemu-devel] [PATCH v3 00/11] Reduce lock contention on TCG hot-path, Alex Bennée, 2016/07/14