lkml.org 
[lkml]   [2016]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] Avoid mutex starvation when optimistic spinning is disabled
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

\
 
 \ /
  Last update: 2016-07-22 20:41    [W:0.158 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site