Re: [Linux-ia64] Help with Ingo scheduler on IA64

David Mosberger
2002-01-21T20:10:56Z

>>>>> On Mon, 21 Jan 2002 21:32:28 +0100 (CET), Ingo Molnar <mingo@elte.hu> said:

Ingo> On Mon, 21 Jan 2002, Erich Focht wrote:

>> Unfortunately the context switch in Ingo's scheduler happens with
>> the runqueue lock held, which can lead to a deadlock eg. if the
>> timer interrupt is called inside and sched_tick spinlocks on the
>> runqueue lock held by schedule(). On IA64 (HZ\x1024) this probably
>> happens much more frequently than on IA32 (HZ\x100).

Ingo> we call context_switch() with irqs disabled. The ia64 version
Ingo> of switch_to() should not re-enable IRQs or it will deadlock.

The existing switch_to() enables interrupts if the new task's stack is
on a different (kernel-) page. If the new scheduler guarantees to
call switch_to() with irqs disabled, we can simply drop the relevant
code.

--david