Re: 2.4.7p6 hang

Trond Myklebust (trond.myklebust@fys.uio.no)
Wed, 11 Jul 2001 18:30:43 +0200


>>>>> " " == Andrea Arcangeli <andrea@suse.de> writes:

> ksoftirqd is quite scheduler intensive, and while its startup
> is correct (no need of any change there), it tends to trigger
> scheduler bugs (one of those bugs was just fixed in pre5). The
> reason I never seen the deadlock I also fixed this other
> scheduler bug in my tree:

> --- 2.4.4aa3/kernel/sched.c.~1~ Sun Apr 29 17:37:05 2001
> +++ 2.4.4aa3/kernel/sched.c Tue May 1 16:39:42 2001
> @@ -674,8 +674,10 @@
> #endif
> spin_unlock_irq(&runqueue_lock);

> - if (prev == next)
> + if (prev == next) {
> + current->policy &= ~SCHED_YIELD;
> goto same_process;
> + }

> #ifdef CONFIG_SMP
> /*

I no longer see the hang with this patch, but I'm not sure I
understand why it works.
Does the above mean that the hang is occuring because spawn_ksoftirqd
is yielding back to itself? If so, the semaphore trick seems more
robust, as it causes a proper sleep until it's safe to wake up.

Cheers,
Trond
-
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/