From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752561AbdJKP23 convert rfc822-to-8bit (ORCPT ); Wed, 11 Oct 2017 11:28:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54966 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752124AbdJKP21 (ORCPT ); Wed, 11 Oct 2017 11:28:27 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 307A57E459 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=dhowells@redhat.com Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20171011125857.GY3521@linux.vnet.ibm.com> References: <20171011125857.GY3521@linux.vnet.ibm.com> <20171010155042.GD3521@linux.vnet.ibm.com> <1507594969-8347-12-git-send-email-paulmck@linux.vnet.ibm.com> <20171010001951.GA6476@linux.vnet.ibm.com> <8079.1507628146@warthog.procyon.org.uk> <26455.1507724399@warthog.procyon.org.uk> To: paulmck@linux.vnet.ibm.com Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org, mingo@kernel.org, torvalds@linux-foundation.org, mark.rutland@arm.com, linux-arch@vger.kernel.org, peterz@infradead.org, will.deacon@arm.com, Jonathan Corbet , Alexander Kuleshov Subject: Re: [PATCH RFC tip/core/rcu 12/15] lib/assoc_array: Remove smp_read_barrier_depends() MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6543.1507735704.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Wed, 11 Oct 2017 16:28:24 +0100 Message-ID: <6544.1507735704@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 11 Oct 2017 15:28:27 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Paul E. McKenney wrote: > Placing the comment on the same line makes it less likely that some > later change will move the comment away from the load that it applies to. The problem with your 'address dep' comment is that it's not particularly useful. Either your comment needs to say "dep between X and Y", but if the following is always the dep: Y = READ_ONCE(X) access(*Y) then the comment is superfluous. If it's not always true then your comment needs to indicate what the dependency is. The other thing your comment could/should say is where the other barrier is - barriers always have to be paired as a general rule. (I know I haven't put these comments in here - but I've been doing that recently). David