Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=37bb6cb4097e29ffee970065b74499cbf10603a3
Commit:     37bb6cb4097e29ffee970065b74499cbf10603a3
Parent:     d3d74453c34f8fd87674a8cf5b8a327c68f22e99
Author:     Peter Zijlstra <[EMAIL PROTECTED]>
AuthorDate: Fri Jan 25 21:08:32 2008 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 21:08:32 2008 +0100

    hrtimer: unlock hrtimer_wakeup
    
    hrtimer_wakeup creates a
    
      base->lock
        rq->lock
    
    lock dependancy. Avoid this by switching to HRTIMER_CB_IRQSAFE_NO_SOFTIRQ
    which doesn't hold base->lock.
    
    This fully untangles hrtimer locks from the scheduler locks, and allows
    hrtimer usage in the scheduler proper.
    
    Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/hrtimer.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 061ae28..bd5d6b5 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -1293,7 +1293,7 @@ void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, 
struct task_struct *task)
        sl->timer.function = hrtimer_wakeup;
        sl->task = task;
 #ifdef CONFIG_HIGH_RES_TIMERS
-       sl->timer.cb_mode = HRTIMER_CB_IRQSAFE_NO_RESTART;
+       sl->timer.cb_mode = HRTIMER_CB_IRQSAFE_NO_SOFTIRQ;
 #endif
 }
 
@@ -1304,6 +1304,8 @@ static int __sched do_nanosleep(struct hrtimer_sleeper 
*t, enum hrtimer_mode mod
        do {
                set_current_state(TASK_INTERRUPTIBLE);
                hrtimer_start(&t->timer, t->timer.expires, mode);
+               if (!hrtimer_active(&t->timer))
+                       t->task = NULL;
 
                if (likely(t->task))
                        schedule();
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to