[lkml]   [2012]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] sched_rt: the task in irq context can be migrated during context switching
    On Thu, 2012-01-05 at 18:55 +0100, Peter Zijlstra wrote:

    > So the problem is quite real, as already said we don't need to worry
    > about the future, but we might want to fix this in previous kernels.
    > What I'm not entirely sure of is the proposed solution, Steven don't we
    > get in trouble by simply bailing out on the push?

    It shouldn't break anything. We shouldn't be pushing tasks that are
    running on a rq anyway. I don't see any harm here. As this scenario can
    only happen if we get an interrupt after letting go of the rq lock and
    before doing the switch_to(). The schedule_tail() calls
    post_schedule_rt() which does the push again, and will push task A at
    that time.

    That said, I'm not sure this patch is enough. I'm worried about a pull
    happening. As task A is running, we could possible possibly pick it on
    another CPU to do a pull.

    Hmm, looking at the code, the pull already does a task_running() test,
    so I guess we should be fine.

    Acked-by: Steven Rostedt <>

    -- Steve

     \ /
      Last update: 2012-01-05 19:17    [W:0.020 / U:25.624 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site