lkml.org 
[lkml]   [2017]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] rtmutex: deboost priority conditionally when rt-mutex unlock
On Thu, Apr 13, 2017 at 12:09:25PM -0400, Steven Rostedt wrote:
> On Thu, 13 Apr 2017 16:39:52 +0200
> Peter Zijlstra <peterz@infradead.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.

The wrongness is in comparing prio and thinking it means anything.

\
 
 \ /
  Last update: 2017-04-13 18:22    [W:0.136 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site