lkml.org 
[lkml]   [2015]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 12/13] stop_machine: Remove lglock
On Wed, Jun 24, 2015 at 11:31:02AM +0200, Peter Zijlstra wrote:
> On Wed, Jun 24, 2015 at 10:32:57AM +0200, Peter Zijlstra wrote:
> > + s = atomic_long_read(&rsp->expedited_done);
> > + if (ULONG_CMP_GE((ulong)s, (ulong)snap)) {
> > + /* ensure test happens before caller kfree */
> > + smp_mb__before_atomic(); /* ^^^ */
>
> FWIW isn't that guaranteed by the control dep?

For trailing stores, yes, but not for trailing loads. Of course,
trailing loads don't matter in the pure kfree case, but do matter in
other situations. And this isn't anywhere near a fastpath, so I
am not all that worried about the extra memory barrier.

Thanx, Paul

> > + atomic_long_inc(&rsp->expedited_workdone1);
> > + goto unlock;
> > + }
>



\
 
 \ /
  Last update: 2015-06-24 16:01    [W:0.709 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site