linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: Waiman Long <waiman.long@hpe.com>
Cc: Jason Low <jason.low2@hpe.com>,
	imre.deak@intel.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 11:03:09 -0700	[thread overview]
Message-ID: <20160722180309.GB1881@linux-80c1.suse> (raw)
In-Reply-To: <57925E25.8010506@hpe.com>

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.

Thanks,
Davidlohr

  reply	other threads:[~2016-07-22 18:03 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 [this message]
2016-07-22 18:29                   ` Imre Deak
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=20160722180309.GB1881@linux-80c1.suse \
    --to=dave@stgolabs.net \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@intel.com \
    --cc=imre.deak@intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).