qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/5] tcg: reorder removal from lists in tb_phys_


From: Sergey Fedorov
Subject: Re: [Qemu-devel] [PATCH 4/5] tcg: reorder removal from lists in tb_phys_invalidate
Date: Thu, 14 Apr 2016 21:37:40 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 14/04/16 18:13, Paolo Bonzini wrote:
> On 14/04/2016 16:45, Sergey Fedorov wrote:
>> Personally, I'm not so
>> happy trying to use pc/cs_base/flags to mark an invalid TB. Are my
>> worries unreasonable? :)
> Can you explain your worries?
>
> The advantages are that it's O(1) and it obviously doesn't affect other
> TBs than the invalidated one.

Well, it looks a bit hucky, I don't like hucky code because it is each
time hard to read, modify and be confident in it. I would like to
introduce a dedicated boolean field to mark a TB as valid/invalid. But
this approach adds one more compare in tb_find_fast() and
tb_find_slow(). Luckily, it may be not an issue if my proposal with
memory barriers and atomic access to 'tb_jmp_cache' solves the problem.

Kind regards,
Sergey



reply via email to

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