lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <57B5D2A2.3060403@hpe.com>
Date:   Thu, 18 Aug 2016 11:22:10 -0400
From:   Waiman Long <waiman.long@....com>
To:     Peter Zijlstra <peterz@...radead.org>
CC:     Jason Low <jason.low2@....com>, Ingo Molnar <mingo@...hat.com>,
        <imre.deak@...el.com>, <linux-kernel@...r.kernel.org>,
        Jason Low <jason.low2@...com>,
        Davidlohr Bueso <dave@...olabs.net>,
        Tim Chen <tim.c.chen@...ux.intel.com>, <terry.rudd@....com>,
        "Paul E. McKenney" <paulmck@...ibm.com>
Subject: Re: [PATCH v2] locking/mutex: Prevent lock starvation when spinning
 is enabled

On 08/18/2016 10:14 AM, Peter Zijlstra wrote:
> On Wed, Aug 10, 2016 at 11:44:08AM -0700, Jason Low wrote:
>> diff --git a/include/linux/mutex.h b/include/linux/mutex.h
>> index 2cb7531..5643a233 100644
>> --- a/include/linux/mutex.h
>> +++ b/include/linux/mutex.h
>> @@ -57,6 +57,8 @@ struct mutex {
>>   #endif
>>   #ifdef CONFIG_MUTEX_SPIN_ON_OWNER
>>   	struct optimistic_spin_queue osq; /* Spinner MCS lock */
>> +#elif defined(CONFIG_SMP)
>> +	bool yield_to_waiter; /* Prevent starvation when spinning disabled */
>>   #endif
>>   #ifdef CONFIG_DEBUG_MUTEXES
>>   	void			*magic;
> Isn't this also possible on !SMP&&  PREEMPT ?

I don't think there is any realistic chance that starvation will happen 
on a uniprocessor system with preemptible kernel. So I don't think that 
is necessary.

Cheers,
Longman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ