4 messages in com.xensource.lists.xen-ia64-develRe: [Xen-ia64-devel] context switch b...
FromSent OnAttachments
Tristan Gingold26 Sep 2005 09:49 
Magenheimer, Dan (HP Labs Fort Collins)26 Sep 2005 12:37 
Tristan Gingold27 Sep 2005 01:05 
Tristan Gingold27 Sep 2005 03:51 
Subject:Re: [Xen-ia64-devel] context switch bug ?
From:Tristan Gingold (Tris@bull.net)
Date:09/27/2005 01:05:11 AM
List:com.xensource.lists.xen-ia64-devel

Le Lundi 26 Septembre 2005 21:38, Magenheimer, Dan (HP Labs Fort Collins) a écrit :

I'm not sure if I'm misunderstanding, but the line that is between context_switch and context_switch_finalize is spin_UNLOCK_irq, which releases the lock, correct?

Sure, but this is not run in the next domain, since a switch has just occured!

Tristan.

Hi,

while working on SMP, I think I hit a problem which may require a local redesign in context switching.

In common/schedule.c(__enter_scheduler), the last lines are:

context_switch(prev, next);

spin_unlock_irq(&schedule_data[cpu].schedule_lock);

context_switch_finalise(next); }

Unfortunatly, on ia64, context_switch does all the work and context_switch_finalise does nothing. Therefore, the cpu-spin lock is still taken when the domain runs [even with one cpu]. It is correct ?

I will try to fix this issue tomorrow, and I will look on x86 code. However, if anymore has already think about this issue, please share!