[Cbe-oss-dev] [RFC] Cell: shutdown method for spu_sysdev_class

Luke Browning lukebr at linux.vnet.ibm.com
Mon May 7 10:37:08 EST 2007


On Sun, 2007-05-06 at 02:34 +0200, Arnd Bergmann wrote:
> On Sunday 06 May 2007, Geoff Levand wrote:
> > 
> > Add a shutdown method to spu_sysdev_class to allow proper spu resource
> > cleanup on system shutdown.  This is needed to support kexec on the PS3
> > platform.
> > 

why is this needed for kexec?  In a crash, shutdown is not called.

> 
> The spu may still be referenced by other data structures. I think it would
> be good style to at least do a list_del_init on spu->list and spu->full_list
> before the kfree.
> 
> I'm not sure if there is anything we can do about tasks that are still
> running on the SPUs at the shutdown point, or if we even want that.

I assume in a shutdown sequence, processes are killed and file systems
are unmounted, so there shouldn't be any tasks with spus open.  Isn't
the same sort of guarantees provided for a simple module unload?  I
assume that if you just tried to unload the module and one of the files
was open, you would get an EBUSY.

> 
> One thing I'd like to understand better is how this interacts with
> kdump. Since we want to be able to dump the state of the SPU, we don't
> want to clean up the state in before loading the dump kernel! Is this
> function called both for kboot and kdump, or is there anything we can
> do to avoid it in the kdump case?
> 
> 	Arnd <><




More information about the cbe-oss-dev mailing list