[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1469134658.2344.12.camel@j-VirtualBox>
Date:	Thu, 21 Jul 2016 13:57:38 -0700
From:	Jason Low <jason.low2@....com>
To:	imre.deak@...el.com
Cc:	jason.low2@....com, Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
	Chris Wilson <chris@...is-wilson.co.uk>,
	Daniel Vetter <daniel.vetter@...el.com>,
	Waiman Long <Waiman.Long@....com>,
	Davidlohr Bueso <dave@...olabs.net>
Subject: Re: [RFC] Avoid mutex starvation when optimistic spinning is
 disabled
On Wed, 2016-07-20 at 16:29 +0300, Imre Deak wrote:
> On ti, 2016-07-19 at 21:39 -0700, Jason Low wrote:
> > On Tue, 2016-07-19 at 16:04 -0700, Jason Low wrote:
> > > Hi Imre,
> > > 
> > > Here is a patch which prevents a thread from spending too much "time"
> > > waiting for a mutex in the !CONFIG_MUTEX_SPIN_ON_OWNER case.
> > > 
> > > Would you like to try this out and see if this addresses the mutex
> > > starvation issue you are seeing in your workload when optimistic
> > > spinning is disabled?
> > 
> > Although it looks like it didn't take care of the 'lock stealing' case
> > in the slowpath. Here is the updated fixed version:
> 
> This also got rid of the problem, I only needed to change the ww
> functions accordingly. Also, imo mutex_trylock() needs the same
> handling
Good point. I supposed mutex_trylock() may not be causing starvation
issues, but I agree that it makes sense if mutex_trylock() fails too if
threads are supposed to yield to a waiter. I'll make the update.
Thanks,
Jason
Powered by blists - more mailing lists
 
