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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160122164630.GA1633@linux-uzut.site>
Date:	Fri, 22 Jan 2016 08:46:30 -0800
From:	Davidlohr Bueso <dave@...olabs.net>
To:	Waiman Long <waiman.long@....com>
Cc:	Ding Tianhong <dingtianhong@...wei.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	"Paul E. McKenney" <paulmck@...ibm.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Will Deacon <Will.Deacon@....com>,
	Jason Low <jason.low2@...com>,
	Tim Chen <tim.c.chen@...ux.intel.com>,
	Waiman Long <Waiman.Long@...com>
Subject: Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list
 is not NULL.

On Fri, 22 Jan 2016, Waiman Long wrote:

>The patch that I sent out is just a proof of concept to make sure
>that it can fix that particular case. I do plan to refactor it if I
>decide to go ahead with an official one. Unlike the OSQ, there can be
>no more than one waiter spinner as the wakeup function is directed to
>only the first task in the wait list and the spinning won't happen
>until the task is first woken up. In the worst case scenario, there
>are only 2 spinners spinning on the lock and the owner field, one
>from OSQ and one from the wait list. That shouldn't put too much
>cacheline contention traffic to the system.

Similarly, I guess we should also wakeup the next waiter in line after
releasing the wait_lock via wake_q. This would allow the woken waiter a
slightly better chance of finding the wait_lock free when continuing to
take the mutex.

Thanks,
Davidlohr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ