lkml.org 
[lkml]   [2013]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 1/3] qrwlock: A queue read/write lock implementation
On Wed, 23 Oct 2013, Waiman Long wrote:
> On 10/23/2013 08:00 AM, walken@google.com wrote:
> > > + /*
> > > + * Wait until the next one in queue set up the next field
> > > + */
> > > + while (likely(!(next = ACCESS_ONCE(node->next))))
> > > + cpu_relax();
> > > + /*
> > > + * The next one in queue is now at the head
> > > + */
> > > +notify_next:
> > > + barrier();
> > > + ACCESS_ONCE(next->wait) = false;
> > > + smp_wmb();
> > > +}
> > I believe this could be unified with mspin_lock() / mspin_unlock() in
> > kernel/mutex.c ? (there is already talk of extending these functions
> > to be used by rwsem for adaptive spinning as well...)
>
> It probably can, but the unification can wait until the code are in.

The unification has to be done as a part of this series. Cleanups are
part of the development process of new code and not an optional
feature.

Thanks,

tglx



\
 
 \ /
  Last update: 2013-10-24 12:41    [W:0.053 / U:0.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site