[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190418083939.GU12232@hirez.programming.kicks-ass.net>
Date: Thu, 18 Apr 2019 10:39:39 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Waiman Long <longman@...hat.com>
Cc: Ingo Molnar <mingo@...hat.com>, Will Deacon <will.deacon@....com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, x86@...nel.org,
Davidlohr Bueso <dave@...olabs.net>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Tim Chen <tim.c.chen@...ux.intel.com>,
huang ying <huang.ying.caritas@...il.com>
Subject: Re: [PATCH v4 08/16] locking/rwsem: Make rwsem_spin_on_owner()
return owner state
On Wed, Apr 17, 2019 at 02:29:02PM -0400, Waiman Long wrote:
> On 04/17/2019 08:47 AM, Peter Zijlstra wrote:
> >>
> >> enum owner_state {
> >> OWNER_NULL = 1 << 0,
> >> OWNER_WRITER = 1 << 1,
> >> OWNER_READER = 1 << 2,
> >> OWNER_NONSPINNABLE = 1 << 3,
> >> };
> >> #define OWNER_SPINNABLE (OWNER_NULL | OWNER_WRITER)
> > Hmm, we should not spin on OWNER_NULL. Or at least not mixed in with the
> > patch that changes the shape of all this. That should go in the RT
> > thingy patch, which comes after this.
>
> We do spin on OWNER_NULL right now, not in rwsem_spin_on_owner() but in
> the main rwsem_optimistic_spin() function.
>
> RT task will quit if owner is NULL.
Yeah, I figured it out eventually :-)
Powered by blists - more mailing lists