Re: spinlock lockup on CPU#0

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Saturday, April 26, 2008 - 11:29 am

On Thu, 24 Apr 2008 01:41:32 +0000 "Justin Mattock" <justinmattock@gmail.com> wrote:


Well that's cute.  At a guess I'd say that acpi_processor_idle() managed to
call sched_clock_idle_wakeup_event() with local interrupts enabled.  We
took an interrupt with rq->lock held and things went downhill from there.

Can you add this please, see if it triggers?


--- a/kernel/sched.c~a
+++ a/kernel/sched.c
@@ -811,6 +811,7 @@ void sched_clock_idle_sleep_event(void)
 {
 	struct rq *rq = cpu_rq(smp_processor_id());
 
+	WARN_ON(!irqs_disabled());
 	spin_lock(&rq->lock);
 	__update_rq_clock(rq);
 	spin_unlock(&rq->lock);
@@ -826,6 +827,7 @@ void sched_clock_idle_wakeup_event(u64 d
 	struct rq *rq = cpu_rq(smp_processor_id());
 	u64 now = sched_clock();
 
+	WARN_ON(!irqs_disabled());
 	rq->idle_clock += delta_ns;
 	/*
 	 * Override the previous timestamp and ignore all
_

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
spinlock lockup on CPU#0, Justin Mattock, (Wed Apr 23, 6:41 pm)
Re: spinlock lockup on CPU#0, Andrew Morton, (Sat Apr 26, 11:29 am)
Re: spinlock lockup on CPU#0, Justin Mattock, (Sat Apr 26, 11:39 am)
Re: spinlock lockup on CPU#0, Ingo Molnar, (Sat Apr 26, 12:14 pm)
Re: spinlock lockup on CPU#0, Justin Mattock, (Sat Apr 26, 12:32 pm)
Re: spinlock lockup on CPU#0, Bob Copeland, (Sat Apr 26, 2:06 pm)
Re: spinlock lockup on CPU#0, Justin Mattock, (Sat Apr 26, 2:48 pm)
Re: spinlock lockup on CPU#0, Hugh Dickins, (Sat Apr 26, 4:04 pm)
Re: spinlock lockup on CPU#0, Venki Pallipadi, (Mon Apr 28, 1:38 pm)
Re: spinlock lockup on CPU#0, Justin Mattock, (Mon Apr 28, 3:02 pm)