lkml.org 
[lkml]   [2016]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC][PATCH 8/8] rtmutex: Fix PI chain order integrity
    On 07/06/16 21:56, Peter Zijlstra wrote:
    > rt_mutex_waiter::prio is a copy of task_struct::prio which is updated
    > during the PI chain walk, such that the PI chain order isn't messed up
    > by (asynchronous) task state updates.
    >
    > Currently rt_mutex_waiter_less() uses task state for deadline tasks;
    > this is broken, since the task state can, as said above, change
    > asynchronously, causing the RB tree order to change without actual
    > tree update -> FAIL.
    >
    > Fix this by also copying the deadline into the rt_mutex_waiter state
    > and updating it along with its prio field.
    >
    > Ideally we would also force PI chain updates whenever DL tasks update
    > their deadline parameter, but for first approximation this is less
    > broken than it was.
    >

    The patch looks OK to me. However, I'm failing to see when we can update
    dl.deadline of a waiter asynchronously. Since a waiter is blocked, we
    can't really change his dl.deadline by calling setscheduler on him, as
    the update would operate on dl.dl_deadline. The new values will start to
    be used as soon as it gets unblocked. The situation seems different for
    RT tasks, for which priority change takes effect immediately.

    What am I missing? :-)

    \
     
     \ /
      Last update: 2016-06-14 20:21    [W:2.964 / U:0.736 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site