Re: linux-next: Tree for Feb 24

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Kevin Winchester
Date: Sunday, February 24, 2008 - 4:35 pm

Rafael J. Wysocki wrote:

Is this how I would do this?  I tried schedule+0x67, but it just showed me the beginning of profile_hit.

(gdb) l *(schedule+0x66)
0xc0325b42 is in schedule (kernel/sched.c:3836).
3831		 * Test if we are atomic. Since do_exit() needs to call into
3832		 * schedule() atomically, we ignore that path for now.
3833		 * Otherwise, whine if we are scheduling when we should not be.
3834		 */
3835		if (unlikely(in_atomic_preempt_off()) && unlikely(!prev->exit_state))
3836			__schedule_bug(prev);
3837	
3838		profile_hit(SCHED_PROFILING, __builtin_return_address(0));
3839	
3840		schedstat_inc(this_rq(), sched_count);

It appears that we are scheduling when we should not be...



(gdb) l *(velocity_suspend+0x37)
0xc0244665 is in velocity_suspend (drivers/net/via-velocity.c:3399).
3394		if(!netif_running(vptr->dev))
3395			return 0;
3396	
3397		netif_device_detach(vptr->dev);
3398	
3399		spin_lock_irqsave(&vptr->lock, flags);
3400		pci_save_state(pdev);
3401	#ifdef ETHTOOL_GWOL
3402		if (vptr->flags & VELOCITY_FLAGS_WOL_ENABLED) {
3403			velocity_get_ip(vptr);
(gdb) 
3404			velocity_save_context(vptr, &vptr->context);
3405			velocity_shutdown(vptr);
3406			velocity_set_wol(vptr);
3407			pci_enable_wake(pdev, PCI_D3hot, 1);
3408			pci_set_power_state(pdev, PCI_D3hot);
3409		} else {
3410			velocity_save_context(vptr, &vptr->context);
3411			velocity_shutdown(vptr);
3412			pci_disable_device(pdev);
3413			pci_set_power_state(pdev, pci_choose_state(pdev, state));
(gdb) 
3414		}
3415	#else
3416		pci_set_power_state(pdev, pci_choose_state(pdev, state));
3417	#endif
3418		spin_unlock_irqrestore(&vptr->lock, flags);
3419		return 0;
3420	}

So velocity_suspend calls spin_lock_irqsave, and then pci_set_power_state which msleep()s.  Is that the root problem here? (I've added Ingo & Peter to the CC list since they may have some comments on the scheduler/lockdep parts of the trace).

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

Messages in current thread:
linux-next: Tree for Feb 24, Stephen Rothwell, (Sat Feb 23, 10:23 pm)
Re: linux-next: Tree for Feb 24, Kevin Winchester, (Sun Feb 24, 11:19 am)
Re: linux-next: Tree for Feb 24, Rafael J. Wysocki, (Sun Feb 24, 1:00 pm)
Re: linux-next: Tree for Feb 24, Kevin Winchester, (Sun Feb 24, 4:35 pm)
Re: linux-next: Tree for Feb 24, Rafael J. Wysocki, (Sun Feb 24, 4:43 pm)
Re: linux-next: Tree for Feb 24, Kevin Winchester, (Sun Feb 24, 5:23 pm)
Re: linux-next: Tree for Feb 24, Pavel Machek, (Mon Feb 25, 2:26 am)
Re: linux-next: Tree for Feb 24, Geert Uytterhoeven, (Mon Feb 25, 2:56 pm)
Re: linux-next: Tree for Feb 24, Randy Dunlap, (Mon Feb 25, 3:30 pm)
Re: linux-next: Tree for Feb 24, Stephen Rothwell, (Mon Feb 25, 4:49 pm)
Re: broken suspend to ram with velocity driver, Kevin Winchester, (Mon Feb 25, 5:24 pm)
Re: broken suspend to ram with velocity driver, Rafael J. Wysocki, (Mon Feb 25, 5:49 pm)
Re: linux-next: Tree for Feb 24, Geert Uytterhoeven, (Tue Feb 26, 12:55 am)
Re: broken suspend to ram with velocity driver, Pavel Machek, (Tue Feb 26, 2:49 pm)
Re: broken suspend to ram with velocity driver, Kevin Winchester, (Tue Feb 26, 5:28 pm)
Re: broken suspend to ram with velocity driver, Kevin Winchester, (Tue Feb 26, 5:36 pm)
Re: broken suspend to ram with velocity driver, Kevin Winchester, (Tue Feb 26, 5:48 pm)
Re: broken suspend to ram with velocity driver, Rafael J. Wysocki, (Wed Feb 27, 5:59 am)
Re: broken suspend to ram with velocity driver, Rafael J. Wysocki, (Wed Feb 27, 6:00 am)
Re: broken suspend to ram with velocity driver, Rafael J. Wysocki, (Wed Feb 27, 6:06 am)
Re: broken suspend to ram with velocity driver, Matthew Garrett, (Wed Feb 27, 6:08 am)