lkml.org 
[lkml]   [2004]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] little schedule() cleanup: use cached current value

* Oleg Nesterov <oleg@tv-sign.ru> wrote:

> @@ -2636,7 +2636,7 @@ switch_tasks:
> } else
> spin_unlock_irq(&rq->lock);
>
> - reacquire_kernel_lock(current);
> + reacquire_kernel_lock(next);
> preempt_enable_no_resched();
> if (unlikely(test_thread_flag(TIF_NEED_RESCHED)))
> goto need_resched;

nack. We switch the kernel stack in switch_to() so 'next' here is the
old task we switched to before we went off the CPU. The value of 'next'
doesnt get carried over a context-switch. (we do carry 'prev' over via
assembly trickery because we need it, but not 'next'.) This change would
most likely result in rare, hard-to-track-down BKL-related crashes all
around the place.

the other bits are OK, please resend them.

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.046 / U:0.924 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site