lkml.org 
[lkml]   [2016]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] rbtree: use READ_ONCE in RB_EMPTY_ROOT
On Mon, Jan 11, 2016 at 10:22:43AM -0800, Davidlohr Bueso wrote:
> With d72da4a4d97 (rbtree: Make lockless searches non-fatal) our rbtrees
> provide weak guarantees that allows us to do lockless (and very speculative)
> reads of the tree. Such readers cannot see partial stores on nodes, ie
> left/right as well as root. As such, similar to the WRITE_ONCE semantics when
> doing rotations, use READ_ONCE when checking the root node in RB_EMPTY_ROOT.

No objection, but is this actually used anywhere?

Or is this a just-in-case completeness thing?

\
 
 \ /
  Last update: 2016-01-12 11:01    [W:0.067 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site