lkml.org 
[lkml]   [2005]   [Apr]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 10 Apr 2005 08:43:24 +0200
FromIngo Molnar <>
SubjectRe: [patch] sched: unlocked context-switches
* David S. Miller <davem@davemloft.net> wrote:

> > Yes, of course.  The deadlock was due to context-switching, not
> > switch_mm() per se.  Hopefully someone else beats me to remembering
> > the details before Monday.
> 
> Sparc64 has a deadlock because we hold mm->page_table_lock during 
> switch_mm().  I bet IA64 did something similar, as I remember it had a 
> very similar locking issue in this area.
> 
> So the deadlock was, we held the runqueue locks over switch_mm(), 
> switch_mm() spins on mm->page_table_lock, the cpu which does have 
> mm->page_table_lock tries to do a wakeup on the first cpu's runqueue. 
> Classic AB-BA deadlock.

yeah, i can see that happening - holding the runqueue lock and enabling 
interrupts. (it's basically never safe to enable irqs with the runqueue 
lock held.)

the patch drops both the runqueue lock and enables interrupts, so this 
particular issue should not trigger.

	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-04-10 06:47    [from the cache]
©2003-2008