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]
Date:	Tue, 14 Jun 2016 13:52:45 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Clark Williams <williams@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Nick Piggin <nickpiggin@...oo.com.au>
Subject: Re: [PATCH] sched: Do not release current rq lock on non contended
 double_lock_balance()

> 
> > 	CPU 0				CPU 1
> > 	-----				-----
> >     [ wake up ]
> > 				     spin_lock(cpu1_rq->lock);
> >     spin_lock(cpu1_rq->lock)
> > 				    double_lock_balance()
> > 				    [ release cpu1_rq->lock ]
> > 				    spin_lock(cpu1_rq->lock)
> >     [due to ticket, now acquires
> >      cpu1_rq->lock ]
> > 
> >     [goes to push task]
> >     double_lock_balance()
> >     [ release cpu1_rq->lock ]
> >                                    [ acquires lock ]
> > 				   spin_lock(cpu2_rq->lock)
> > 				   [ blocks as cpu2 is using it ]
> >   
> 
> Also, its not entirely clear this scenario helps illustrate how your
> change is better; because here the lock _is_ contended, so we'll fail
> the trylock, no?

Sorry, I should have been more specific that the double lock balance
was grabbing cpu2_rq (another rq lock), where there was no contention.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ