lkml.org 
[lkml]   [2015]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ipc/sem.c: Update/correct memory barriers.
On Sat, Feb 28, 2015 at 09:36:15PM +0100, Manfred Spraul wrote:
> +/*
> + * Place this after a control barrier (such as e.g. a spin_unlock_wait())
> + * to ensure that reads cannot be moved ahead of the control_barrier.
> + * Writes do not need a barrier, they are not speculated and thus cannot
> + * pass the control barrier.
> + */
> +#ifndef smp_mb__after_control_barrier
> +#define smp_mb__after_control_barrier() smp_rmb()
> +#endif

Sorry to go bike shedding again; but should we call this:

smp_acquire__after_control_barrier() ?

The thing is; its not a full MB because:

- stores might actually creep into it; while the control dependency
guarantees stores will not creep out, nothing is stopping them from
getting in;

- its not transitive, and our MB is defined to be so.

Oleg, Paul?


\
 
 \ /
  Last update: 2015-02-28 23:01    [W:0.069 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site