lkml.org 
[lkml]   [2010]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] rtmutex: multiple candidate owners without unrelated boosting
From
Date
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,
> }
>




\
 
 \ /
  Last update: 2010-12-15 00:19    [from the cache]
©2003-2011 Jasper Spaans