Messages in this thread |  | | Date | Wed, 5 Oct 2016 10:32:53 +0200 | From | Peter Zijlstra <> | Subject | Re: [RFC][PATCH 4/4] futex: Rewrite FUTEX_UNLOCK_PI |
| |
On Wed, Oct 05, 2016 at 10:21:02AM +0200, Sebastian Andrzej Siewior wrote: > On 2016-10-05 10:09:12 [+0200], Peter Zijlstra wrote: > > On Wed, Oct 05, 2016 at 09:41:47AM +0200, Sebastian Andrzej Siewior wrote: > > > are those problems DL related? > > > > One of them, the other is that PI thing you did that ugly nodeboost > > thing for, right? > > this no-de-boost yes. This is probably a problem since we have this > "delayed" wake-up. I've been thinking about a marked in PI state to > ignore a de-boost so the spin_unlock() won't be a problem. But if I > understand it right, then this won't solve the DL problem since you > can't have two tasks at the same priority.
The primary concern for DL right now is being able to have a stable pointer to the top waiter. We do this by having rt_mutex_setprio() update the pointer while holding both rq->lock and tsk->pi_lock.
This means the pointer is stable when holding either lock, which is sufficient.
But this means, we need to deboost _before_ we wake. Otherwise the task could've continued running and called do_exit() on us.
Secondary, once we start looking at BWI (bandwidth inheritance), where a blocked DL task donates its runtime budget along with its deadline, we also very much need this, since a task cannot be running of its own budget while at the same time the boosted task is also running off that same budget.
(having the 'blocked' DL task spin-waiting, as per optimistic spinning, makes all that rather 'interesting').
In any case, this is two problems:
- your inversion issue - my pointer stability (and eventually bandwidth issue)
that are caused by this hb->lock being in the way.
|  |