Messages in this thread | | | Subject | Re: [PATCH] rtmutex: multiple candidate owners without unrelated boosting | From | Steven Rostedt <> | Date | Tue, 14 Dec 2010 18:16:46 -0500 |
| |
On Tue, 2010-12-14 at 17:04 +0800, Lai Jiangshan wrote:
> /* Release the task */ > raw_spin_unlock_irqrestore(&task->pi_lock, flags); > + if (!rt_mutex_owner(lock)) { > + /* > + * the lock is free and has waiters, set the top waiter > + * as a new candidate owner when it is not set. > + */ > + if (top_waiter != rt_mutex_top_waiter(lock)) { > + top_waiter = rt_mutex_top_waiter(lock); > + top_waiter->cand_seq = lock->cand_seq;
Shouldn't this be:
top_waiter->cand_seq = ++lock->cand_seq;
?
-- Steve
> + if (!top_waiter->cand_owner) { > + top_waiter->cand_owner = 1; > + wake_up_process(top_waiter->task); > + } > + } > + raw_spin_unlock(&lock->wait_lock); > + goto out_put_task; > + } > put_task_struct(task); > > /* Grab the next task */ > @@ -296,78 +303,16 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task, > } >
| |