lkml.org 
[lkml]   [2014]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/16] doc: memory-barriers.txt: Document use of lockless_dereference()
On Thu, Nov 13, 2014 at 02:24:08PM -0500, Pranith Kumar wrote:
> Recently lockless_dereference() was added which can be used in place of
> hard-coding smp_read_barrier_depends(). The following PATCH makes the change.
>
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> ---
> Documentation/memory-barriers.txt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
> index 3d5f49b..841ac36 100644
> --- a/Documentation/memory-barriers.txt
> +++ b/Documentation/memory-barriers.txt
> @@ -203,7 +203,7 @@ There are some minimal guarantees that may be expected of a CPU:
> and always in that order. On most systems, smp_read_barrier_depends()
> does nothing, but it is required for DEC Alpha. The ACCESS_ONCE()
> is required to prevent compiler mischief. Please note that you
> - should normally use something like rcu_dereference() instead of
> + should normally use something like lockless_dereference() instead of

Good catch, but please keep both possibilities, something like
"... like rcu_dereference() or lockless_dereference() instead of ..."

Thanx, Paul

> open-coding smp_read_barrier_depends().
>
> (*) Overlapping loads and stores within a particular CPU will appear to be
> --
> 1.9.1
>



\
 
 \ /
  Last update: 2014-11-13 21:41    [W:0.169 / U:1.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site