[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 01/11] util/qht: Document memory ordering ass
From: |
Sergey Fedorov |
Subject: |
Re: [Qemu-devel] [PATCH v3 01/11] util/qht: Document memory ordering assumptions |
Date: |
Thu, 14 Jul 2016 17:08:48 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 |
On 14/07/16 16:56, Paolo Bonzini wrote:
>
> On 13/07/2016 19:50, Sergey Fedorov wrote:
>> On 13/07/16 10:36, Paolo Bonzini wrote:
>>> On 13/07/2016 01:19, Emilio G. Cota wrote:
>>>> I wouldn't put those comments in the source--seqlock callers should
>>>> know what they're doing, and what barriers seqlocks imply.
>>> In general I'd agree with you, however in this case the "begin" calls
>>> are what implements QHT's guarantee *for the caller*, so I think it's
>>> worth having the comments. In other words, if for any reason you do
>>> anything before the read_begin and write_begin you still have to provide
>>> barrier semantics. It's not an explanation, it's a protection against
>>> future mistakes.
>> Exactly :)
>>
>>> There's no need for such comment at read_retry and write_end callsites,
>>> though.
>> Why?
>>
>>> Also, it's spelled "guarantee". :)
>> Hmm, I can't see where the spelling isn't correct.
> There are a few "gaurantee"s in the patch.
Ah, I see this now :)
>
> If you decide to go with my own patch
> (http://article.gmane.org/gmane.comp.emulators.qemu/426431) for v4,
> please add a
>
> Signed-off-by: Paolo Bonzini <address@hidden>
Thanks,
Sergey
Re: [Qemu-devel] [PATCH v3 01/11] util/qht: Document memory ordering assumptions, Paolo Bonzini, 2016/07/13
Re: [Qemu-devel] [PATCH v3 01/11] util/qht: Document memory ordering assumptions, Sergey Fedorov, 2016/07/15
Re: [Qemu-devel] [PATCH v3 01/11] util/qht: Document memory ordering assumptions, Paolo Bonzini, 2016/07/15
Re: [Qemu-devel] [PATCH v3 01/11] util/qht: Document memory ordering assumptions, Sergey Fedorov, 2016/07/15
[Qemu-devel] [PATCH v3 03/11] tcg: Prepare safe tb_jmp_cache lookup out of tb_lock, Sergey Fedorov, 2016/07/12
[Qemu-devel] [PATCH v3 02/11] cpu-exec: Pass last_tb by value to tb_find_fast(), Sergey Fedorov, 2016/07/12
[Qemu-devel] [PATCH v3 04/11] tcg: Prepare safe access to tb_flushed out of tb_lock, Sergey Fedorov, 2016/07/12