[PATCH] usbatm: Update to use the kthread api.

Alan Stern stern at rowland.harvard.edu
Fri Dec 15 07:14:06 PST 2006


On Fri, 15 Dec 2006, Christoph Hellwig wrote:

> > Are signals the best available mechanism to request that a thread
> > stop that can exit on it's own.
> 
> Defintly not.  signals should be avoided in kernel threads at all
> cost.

I have a driver that spawns a kernel thread (using kthread_create) which 
does I/O by calling vfs_write and vfs_read.  It relies on signals to 
interrupt the I/O activity when necessary.  Maybe this isn't a good way of 
doing things, but I couldn't think of anything better.

Do you have any suggestions?

Alan Stern

P.S.: What is the reason for saying "signals should be avoided in kernel
threads at all cost"?




More information about the Containers mailing list