• Du, Changbin's avatar
    drm/i915/gvt: fix nested sleeping issue · e45d7b7f
    Du, Changbin authored
    We cannot use blocking method mutex_lock inside a wait loop.
    Here we invoke pick_next_workload() which needs acquire a
    mutex in our "condition" experssion. Then we go into a another
    of the going-to-sleep sequence and changing the task state.
    This is a dangerous. Let's rewrite the wait sequence to avoid
    nested sleeping.
    
    v2: fix do...while loop exit condition (zhenyu)
    v3: rebase to gvt-staging branch
    Signed-off-by: default avatarDu, Changbin <changbin.du@intel.com>
    Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
    e45d7b7f
scheduler.c 15.3 KB