OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] usbatm: Update to use the kthread api.
Re: [PATCH] usbatm: Update to use the kthread api. [message #17050 is a reply to message #17043] Thu, 14 December 2006 16:05 Go to previous messageGo to previous message
Alan Stern is currently offline  Alan Stern
Messages: 5
Registered: December 2006
Junior Member
On Thu, 14 Dec 2006, Eric W. Biederman wrote:

> Actually I don't accept that a signal needs to be sent.  I do accept
> that the message needs to be delivered to stop things early.
> 
> The paradigm in a kthread world for waking up kernel threads is by
> calling kthread_stop, and then for testing if a kernel thread should
> stop is by calling kthread_should_stop.
> 
> Especially if you are looking at generalizing this code over all of
> usb it should probably be using the current kernel best practices.
> 
> There is still an issue with msleep here that I completely concede.
> In particular neither msleep nor msleep interruptible will actually be
> awoken by kthread_stop.  So it looks like we need a msleep_kthread
> that will won't go back to sleep if after kthread_stop wakes it up.
> Still unless I am blind that looks like a very minor change from where
> we are now. 

Something else to think about.  I've got a driver that starts up a kernel 
thread which calls vfs_read() and vfs_write() and relies on signals to 
interrupt the I/O operations when necessary.  Perhaps this approach is 
fundamentally wrong, but I'm not sure how else to do it.

Alan Stern

_______________________________________________
Containers mailing list
Containers@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH] Set a separate lockdep class for neighbour table's proxy_queue
Next Topic: Re: Getting the new RxRPC patches upstream
Goto Forum:
  


Current Time: Thu Oct 23 04:16:34 GMT 2025

Total time taken to generate the page: 0.07891 seconds