[lkml]   [2017]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/3] rtmutex: comments update

On 04/15/2017 02:43 AM, Steven Rostedt wrote:
>> Yes, how about this?
>> +If the G process has highest priority in the chain, any rightside lock owners
>> +in the tree branch need to increase its' priority as high as G.
> If task G is the highest priority task in the chain, then all the tasks
> up the chain (A and B in this example), must have their priorities
> increased to that of G.

Sounds better than mine. :)
>> The schedule can then wake up for a couple of reasons:
> The task can then wake up for a couple of reasons:

>> 1) The previous lock owner released the lock, and we are top_waiter now
> and the task is now the top_waiter

>> 2) we received a signal or timeout
>> For the first reason, we could get the lock in acquisition retry and back to
>> TASK_RUNNING state.
> Actually that's not quite true.
> In the first case, the task will try again to acquire the lock. If it
> does, then it will take itself off the waiters tree and set itself back
> to the TASK_RUNNING state. If the lock was acquired by another task
> before this task could get the lock, then it will go back to sleep and
> wait to be woken again.

Yes, your version includes the failure conditions in lock retrying. will
use yours explanation, thanks!

>> For the second reason, if task is in TASK_INTERRUPTIBLE
>> state, we will give up the lock acquisition, and also back to TASK_RUNNING.
> The second case is only applicable for tasks that are grabbing a mutex
> that can wake up before getting the lock, either due to a signal or
> a timeout (i.e. rt_mutex_timed_futex_lock()). When woken, it will try to
> take the lock again, if it succeeds, then the task will return with the
> lock held, otherwise it will return with -EINTR if the task was woken
> by a signal, or -ETIMEDOUT if it timed out.

Will use yours version too. Thanks a lot!
>> Otherwise we will yield cpu and back to sleep.
> Nuke the above sentence.

Drop this sentence.

 \ /
  Last update: 2017-04-18 10:40    [W:0.061 / U:2.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site