From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bN6xi-0006jW-Vu for qemu-devel@nongnu.org; Tue, 12 Jul 2016 19:19:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bN6xe-00061m-QC for qemu-devel@nongnu.org; Tue, 12 Jul 2016 19:19:33 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:45853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bN6xc-0005yF-H8 for qemu-devel@nongnu.org; Tue, 12 Jul 2016 19:19:30 -0400 Date: Tue, 12 Jul 2016 19:19:17 -0400 From: "Emilio G. Cota" Message-ID: <20160712231917.GA11378@flamenco> References: <1468354426-837-1-git-send-email-sergey.fedorov@linaro.org> <1468354426-837-2-git-send-email-sergey.fedorov@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1468354426-837-2-git-send-email-sergey.fedorov@linaro.org> 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: Sergey Fedorov Cc: qemu-devel@nongnu.org, mttcg@listserver.greensocs.com, fred.konrad@greensocs.com, a.rigo@virtualopensystems.com, serge.fdrv@gmail.com, bobby.prani@gmail.com, rth@twiddle.net, patches@linaro.org, mark.burton@greensocs.com, pbonzini@redhat.com, jan.kiszka@siemens.com, peter.maydell@linaro.org, claudio.fontana@huawei.com, Alex =?iso-8859-1?Q?Benn=E9e?= On Tue, Jul 12, 2016 at 23:13:36 +0300, Sergey Fedorov wrote: > From: Sergey Fedorov > It is naturally expected that some memory ordering should be provided > around qht_insert(), qht_remove(), and qht_lookup(). Document these > assumptions in the header file and put some comments in the source to > denote how that memory ordering requirements are fulfilled. I wouldn't put those comments in the source--seqlock callers should know what they're doing, and what barriers seqlocks imply. I'm OK with stating what the implied ordering is in the header file, though. Thanks, Emilio