All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@canonical.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Mike Galbraith <umgwanakikbuti@gmail.com>
Subject: Re: [PATCH 2/3] locking: ww_mutex: Allow to use rt_mutex instead of mutex for the baselock
Date: Tue, 10 Mar 2015 19:21:10 +0100	[thread overview]
Message-ID: <54FF3616.8060004@canonical.com> (raw)
In-Reply-To: <20150310152826.GE2896@worktop.programming.kicks-ass.net>

Hey,

Op 10-03-15 om 16:28 schreef Peter Zijlstra:
> 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 ;)
Indeed!

~Maarten

  reply	other threads:[~2015-03-10 18:21 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 16:57 rt_mutex based ww_mutex implementation Sebastian Andrzej Siewior
2015-02-27 16:57 ` [PATCH 1/3] locking: ww_mutex: add one level of indirection for access of the lock Sebastian Andrzej Siewior
2015-02-27 18:20   ` Maarten Lankhorst
2015-02-27 18:57     ` Sebastian Andrzej Siewior
2015-02-27 16:57 ` [PATCH 2/3] locking: ww_mutex: Allow to use rt_mutex instead of mutex for the baselock Sebastian Andrzej Siewior
2015-03-02  3:20   ` Mike Galbraith
2015-03-02  8:46     ` Maarten Lankhorst
2015-03-02 12:50       ` Mike Galbraith
2015-03-06 12:14       ` Sebastian Andrzej Siewior
2015-03-06 12:16         ` Maarten Lankhorst
2015-03-06 12:36           ` Sebastian Andrzej Siewior
2015-03-06 17:50             ` Mike Galbraith
2015-03-09 10:00               ` Sebastian Andrzej Siewior
2015-03-09 10:51                 ` Mike Galbraith
2015-03-09 11:07                   ` Sebastian Andrzej Siewior
2015-03-09 11:29                     ` Mike Galbraith
2015-03-09 13:21                       ` Sebastian Andrzej Siewior
2015-03-09 22:27                         ` Paul E. McKenney
2015-03-10 12:30   ` Peter Zijlstra
2015-03-10 12:37   ` Peter Zijlstra
2015-03-10 12:39     ` Peter Zijlstra
2015-03-10 14:10     ` Maarten Lankhorst
2015-03-10 15:28       ` Peter Zijlstra
2015-03-10 18:21         ` Maarten Lankhorst [this message]
2015-03-10 12:43   ` Peter Zijlstra
2015-03-10 12:46   ` Peter Zijlstra
2015-02-27 16:57 ` [PATCH 3/3] locking: rtmutex: set state back to running on error Sebastian Andrzej Siewior
2015-02-28 10:00   ` [tip:locking/urgent] locking/rtmutex: Set " tip-bot for Sebastian Andrzej Siewior
2015-03-01  5:35   ` [PATCH 3/3] locking: rtmutex: set " Mike Galbraith
2015-03-01  8:48   ` [tip:locking/urgent] locking/rtmutex: Set " tip-bot for Sebastian Andrzej Siewior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54FF3616.8060004@canonical.com \
    --to=maarten.lankhorst@canonical.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=umgwanakikbuti@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.