lkml.org 
[lkml]   [2017]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH RFC tip/core/rcu 12/15] lib/assoc_array: Remove smp_read_barrier_depends()
Date
Paul E. McKenney <paulmck@linux.vnet.ibm.com> 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

\
 
 \ /
  Last update: 2017-10-11 17:30    [W:0.294 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site