From: Imre Deak <imre.deak@intel.com>
To: Davidlohr Bueso <dave@stgolabs.net>, Waiman Long <waiman.long@hpe.com>
Cc: Jason Low <jason.low2@hpe.com>,
Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
Chris Wilson <chris@chris-wilson.co.uk>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [RFC] Avoid mutex starvation when optimistic spinning is disabled
Date: Fri, 22 Jul 2016 21:29:44 +0300 [thread overview]
Message-ID: <1469212184.9353.15.camel@intel.com> (raw)
In-Reply-To: <20160722180309.GB1881@linux-80c1.suse>
On Fri, 2016-07-22 at 11:03 -0700, Davidlohr Bueso wrote:
> On Fri, 22 Jul 2016, Waiman Long wrote:
>
> > I think making mutex_trylock() fail maybe a bit too far. Do we
> > really
> > have any real workload that cause starvation problem because of
> > that.
> > Code that does mutex_trylock() in a loop can certainly cause lock
> > starvation, but it is not how mutex_trylock() is supposed to be
> > used.
> > We can't build in safeguard for all the possible abuses of the
> > mutex
> > APIs.
>
> True, and that's actually why I think that 'fixing' the
> !SPIN_ON_OWNER case
> is a bit too far in the first place: most of the archs that will care
> about
> this already have ARCH_SUPPORTS_ATOMIC_RMW. The extra code for
> dealing with
> this is not worth it imo.
SPIN_ON_OWNER is also disabled in case of DEBUG_MUTEXES, which is the
config where I wanted to avoid starvation in the first place.
--Imre
next prev parent reply other threads:[~2016-07-22 18:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-18 16:16 [RFC] locking/mutex: Fix starvation of sleeping waiters Imre Deak
2016-07-18 17:15 ` Peter Zijlstra
2016-07-18 17:47 ` Jason Low
2016-07-19 16:53 ` Imre Deak
2016-07-19 22:57 ` Jason Low
2016-07-19 23:04 ` [RFC] Avoid mutex starvation when optimistic spinning is disabled Jason Low
2016-07-20 4:39 ` Jason Low
2016-07-20 13:29 ` Imre Deak
2016-07-21 20:57 ` Jason Low
2016-07-22 17:55 ` Waiman Long
2016-07-22 18:03 ` Davidlohr Bueso
2016-07-22 18:29 ` Imre Deak [this message]
2016-07-22 19:26 ` Davidlohr Bueso
2016-07-22 19:53 ` Imre Deak
2016-07-20 18:37 ` Waiman Long
2016-07-21 22:29 ` Jason Low
2016-07-22 9:34 ` Imre Deak
2016-07-22 18:44 ` Jason Low
2016-07-22 18:01 ` Waiman Long
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1469212184.9353.15.camel@intel.com \
--to=imre.deak@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@intel.com \
--cc=dave@stgolabs.net \
--cc=jason.low2@hpe.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=waiman.long@hpe.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome