lkml.org 
[lkml]   [2011]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 2/2] x86: Make the x86-64 stacktrace code safely callable from scheduler
    From
    Date
    On Fri, 2011-05-13 at 14:48 +0200, Frederic Weisbecker wrote:
    > I haven't observed any deadlock. trace events disable preemption and
    > other tracers do too (my changelog was buggy).
    >
    > I just worried about potential other users, like a WARN_ON in the
    > scheduler or so.
    >
    > My worry is the following scenario:
    >
    > schedule() {
    > acquire(rq)
    > set_tsk_need_resched
    > WARN_ON() {
    > stack_trace() {
    > preempt_enable() {
    > preempt_schedule() {

    Would never happen, because rq->lock is a spinlock which holds another
    preempt count so preempt_enable() would never schedule.

    > acquire(rq)
    > }
    > }
    > }
    > }
    > }



    > I don't know if it happens that one set TIF_NEED_RESCHED remotely,

    Yes

    > or if TIF_NEED_RESCHED can be set when we hold the rq,

    Yes

    > and then we
    > can be followed by a WARN_ON, ...

    Not quite sure, but possible.

    > So I preferred to be careful.

    Still not quite seeing how all things could go bang.


    \
     
     \ /
      Last update: 2011-05-13 15:23    [W:0.023 / U:30.760 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site