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:   Thu, 13 Apr 2017 12:09:25 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Alex Shi <alex.shi@...aro.org>, mingo@...hat.com, corbet@....net,
        "open list:LOCKING PRIMITIVES" <linux-kernel@...r.kernel.org>,
        Sebastian Siewior <bigeasy@...utronix.de>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 2/3] rtmutex: deboost priority conditionally when
 rt-mutex unlock

On Thu, 13 Apr 2017 16:39:52 +0200
Peter Zijlstra <peterz@...radead.org> wrote:

> On Thu, Apr 13, 2017 at 10:02:53PM +0800, Alex Shi wrote:
> >  	/*
> > +	 * 'current' release this lock, so 'current' should be a higher prio
> > +	 * task than the next top waiter, unless the current prio was gotten
> > +	 * from this top waiter, iff so, we need to deboost 'current' after
> > +	 * the lock release.
> > +	 */
> > +	if (current->prio == waiter->prio)
> > +		deboost = true;  
> 
> This is wrong.

The comment is, especially that "iff". What if current and waiter
happen to have the same priority? Then it too doesn't need to be
deboosted.

But that said, we currently perform the deboost unconditionally. I
can't think of a case where current->prio != waiter->prio where we
should perform the deboost, because current->prio should always be <=
waiter->prio (where lower prio means higher priority). Maybe I'm missing
something.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ