Re: [PATCH v2 1/3] rtmutex: update rt-mutex-design

From: Alex Shi
Date: Mon Apr 24 2017 - 09:45:46 EST


structure holds a pointer to the task, as well as the mutex that
>> - the task is blocked on. It also has the plist node structures to
>> - place the task in the waiter_list of a mutex as well as the
>> - pi_list of a mutex owner task (described below).
>> + the task is blocked on. It also has a rbtree node structures to
>
> Here I assume we are talking about struct rt_mutex_waiter[1]. If so I
> suggest to replace rbtree with rb_node.

They are the same thing here, rbtree node and rb_node. :)

>
>> + place the task in waiters rbtree of a mutex as well as the
>> + pi_waiters rbtree of a mutex owner task (described below).
>
> Also following the comment for @pi_tree_entry, s/"a mutex owner
> task"/"a mutex owner waiters tree" .

As my understand, pi_waiters is in task structure. We refer to what's
the pi_tree_entry in.

>
> [1]. http://lxr.free-electrons.com/source/kernel/locking/rtmutex_common.h#L25
>
>
>> -
>> +If the G process has highest priority in the chain, then all the tasks up
>
> If process G has the highest priority in the chain, ...

Sounds better. Thanks!
>> +mutex (waiter "task" field is not NULL), then we go to sleep (call schedule)
>> +
>
> This change was likely not done on purpose.

Yes. Thanks.
>