Re: [PATCH v4] lib/dlock-list: Scale dlock_lists_empty()
From: Peter Zijlstra
Date: Thu Nov 09 2017 - 12:41:01 EST
On Thu, Nov 09, 2017 at 09:24:08AM -0800, Davidlohr Bueso wrote:
> On Wed, 08 Nov 2017, Boqun Feng wrote:
> > Or worse:
> >
> > * CPU0 CPU1
> > * dlock_list_add() dlock_lists_empty()
> > * smp_mb__before_atomic();
> > * [L] atomic_read(used_lists)
Note that this is broken; smp_mb__before_atomic() is not valid on
atomic_read().
> > * [S] atomic_inc(used_lists);
> > * smp_mb__after_atomic();
> >