From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34285) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNhJx-0007Qt-CV for qemu-devel@nongnu.org; Thu, 14 Jul 2016 10:08:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNhJs-0007Vk-5N for qemu-devel@nongnu.org; Thu, 14 Jul 2016 10:08:56 -0400 Received: from mail-lf0-x233.google.com ([2a00:1450:4010:c07::233]:33296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNhJr-0007Vb-So for qemu-devel@nongnu.org; Thu, 14 Jul 2016 10:08:52 -0400 Received: by mail-lf0-x233.google.com with SMTP id b199so65029398lfe.0 for ; Thu, 14 Jul 2016 07:08:51 -0700 (PDT) References: <1468354426-837-1-git-send-email-sergey.fedorov@linaro.org> <1468354426-837-2-git-send-email-sergey.fedorov@linaro.org> <20160712231917.GA11378@flamenco> <57867F50.4030503@gmail.com> <87335ff3-c78f-35e7-bc11-3823de603a85@redhat.com> From: Sergey Fedorov Message-ID: <57879CF0.3070905@gmail.com> Date: Thu, 14 Jul 2016 17:08:48 +0300 MIME-Version: 1.0 In-Reply-To: <87335ff3-c78f-35e7-bc11-3823de603a85@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 01/11] util/qht: Document memory ordering assumptions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , "Emilio G. Cota" , Sergey Fedorov Cc: mttcg@listserver.greensocs.com, peter.maydell@linaro.org, patches@linaro.org, mark.burton@greensocs.com, claudio.fontana@huawei.com, a.rigo@virtualopensystems.com, qemu-devel@nongnu.org, jan.kiszka@siemens.com, bobby.prani@gmail.com, fred.konrad@greensocs.com, =?UTF-8?Q?Alex_Benn=c3=a9e?= , rth@twiddle.net 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 Thanks, Sergey