lkml.org 
[lkml]   [2016]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch V2 2/7] futex: Hash private futexes per process
On 2016-05-19 14:21:48 [+0200], Peter Zijlstra wrote:
> > +static void futex_populate_hash(unsigned int hash_bits)
> > +{

> > + raw_spin_lock(&mm->futex_hash.lock);
> > + /* We might have raced with another task allocating the hash. */
> > + if (!mm->futex_hash.hash) {
> > + mm->futex_hash.hash_bits = hash_bits;
> > + /*
> > + * Ensure that the above is visible before we store
> > + * the pointer.
> > + */
> > + smp_wmb(); /* (A0) Pairs with (B) */
> > + mm->futex_hash.hash = hb;
>
> smp_store_release(&mm->futex_hash.hash, hb); ?

just to be clear: You suggest to use "smp_store_release()" instead
smp_wmb() followed by the assignment?

Sebastian

\
 
 \ /
  Last update: 2016-05-27 19:01    [W:0.137 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site