lkml.org 
[lkml]   [2015]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] locking: ww_mutex: Allow to use rt_mutex instead of mutex for the baselock
On Tue, Mar 10, 2015 at 03:10:46PM +0100, Maarten Lankhorst wrote:
> Op 10-03-15 om 13:37 schreef Peter Zijlstra:

> > So IIRC this is the function that checks who gets wounded (and gets to
> > do the whole retry thing), right?
> >
> > So for the RT case, I think we should extend it to not (primarily) be a
> > FIFO thing, but also consider the priority of the tasks involved.
> >
> > Maybe a little something like:
> >
> > if (hold_ctx->task->prio < ctx->task->prio)
> > return -EDEADLOCK;
> >
> > before the timestamp check; although I suppose we should also add a
> > deadline test in case both prios are -1.

> I think that's useful but if you implement -EDEADLK based on thread
> priority, any boosted thread should receive -EDEADLK when it tries to
> acquire a new lock in the same context, to force it to back off..

But _only_ if the boost comes from inside the ww_ctx, right?

Yeah, implementing that might be tricky, maybe we can keep it as a note
for now ;)


\
 
 \ /
  Last update: 2015-03-10 16:41    [W:0.059 / U:2.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site