* Behaviour of device_register @ 2008-03-05 23:25 Adrian McMenamin 2008-03-05 23:46 ` Greg KH 0 siblings, 1 reply; 5+ messages in thread From: Adrian McMenamin @ 2008-03-05 23:25 UTC (permalink / raw) To: Greg KH, LKML; +Cc: linux-sh The observed behaviour for me is that it appears to be blocking the vblank interrupt on my box (or more accurately stopping the workqueue that the interrupt handler calls from running). And without the vblank my bus won't process dma and so therefore the attempt to register the device in question fails. But I can see no reason from a glance over the code why that (vblanks being blocked) would be the case - have I missed something and the vblanks will be blocked, or should I be looking elsewhere for the root cause of this problem? Thanks Adrian ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Behaviour of device_register 2008-03-05 23:25 Behaviour of device_register Adrian McMenamin @ 2008-03-05 23:46 ` Greg KH 2008-03-06 12:31 ` Adrian McMenamin 0 siblings, 1 reply; 5+ messages in thread From: Greg KH @ 2008-03-05 23:46 UTC (permalink / raw) To: Adrian McMenamin; +Cc: LKML, linux-sh On Wed, Mar 05, 2008 at 11:25:48PM +0000, Adrian McMenamin wrote: > The observed behaviour for me is that it appears to be blocking the > vblank interrupt on my box (or more accurately stopping the workqueue > that the interrupt handler calls from running). And without the vblank > my bus won't process dma and so therefore the attempt to register the > device in question fails. > > But I can see no reason from a glance over the code why that (vblanks > being blocked) would be the case - have I missed something and the > vblanks will be blocked, or should I be looking elsewhere for the root > cause of this problem? device_register(), on it's own, does not touch any hardware, nor prevent anything else in the kernel from happening. So I think you need to look elsewhere, like into the bus that is doing the device_register() call :) good luck, greg k-h ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Behaviour of device_register 2008-03-05 23:46 ` Greg KH @ 2008-03-06 12:31 ` Adrian McMenamin 2008-03-06 16:30 ` Greg KH 0 siblings, 1 reply; 5+ messages in thread From: Adrian McMenamin @ 2008-03-06 12:31 UTC (permalink / raw) To: Greg KH; +Cc: Adrian McMenamin, LKML, linux-sh On Wed, March 5, 2008 11:46 pm, Greg KH wrote: > On Wed, Mar 05, 2008 at 11:25:48PM +0000, Adrian McMenamin wrote: >> The observed behaviour for me is that it appears to be blocking the >> vblank interrupt on my box (or more accurately stopping the workqueue >> that the interrupt handler calls from running). And without the vblank >> my bus won't process dma and so therefore the attempt to register the >> device in question fails. >> >> But I can see no reason from a glance over the code why that (vblanks >> being blocked) would be the case - have I missed something and the >> vblanks will be blocked, or should I be looking elsewhere for the root >> cause of this problem? > > device_register(), on it's own, does not touch any hardware, nor prevent > anything else in the kernel from happening. > > So I think you need to look elsewhere, like into the bus that is doing > the device_register() call :) > It turns out this is a lock contention issue. The code blocks waiting for a lock that will never be freed. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Behaviour of device_register 2008-03-06 12:31 ` Adrian McMenamin @ 2008-03-06 16:30 ` Greg KH 2008-03-06 17:51 ` Adrian McMenamin 0 siblings, 1 reply; 5+ messages in thread From: Greg KH @ 2008-03-06 16:30 UTC (permalink / raw) To: Adrian McMenamin; +Cc: Adrian McMenamin, LKML, linux-sh On Thu, Mar 06, 2008 at 12:31:21PM -0000, Adrian McMenamin wrote: > On Wed, March 5, 2008 11:46 pm, Greg KH wrote: > > On Wed, Mar 05, 2008 at 11:25:48PM +0000, Adrian McMenamin wrote: > >> The observed behaviour for me is that it appears to be blocking the > >> vblank interrupt on my box (or more accurately stopping the workqueue > >> that the interrupt handler calls from running). And without the vblank > >> my bus won't process dma and so therefore the attempt to register the > >> device in question fails. > >> > >> But I can see no reason from a glance over the code why that (vblanks > >> being blocked) would be the case - have I missed something and the > >> vblanks will be blocked, or should I be looking elsewhere for the root > >> cause of this problem? > > > > device_register(), on it's own, does not touch any hardware, nor prevent > > anything else in the kernel from happening. > > > > So I think you need to look elsewhere, like into the bus that is doing > > the device_register() call :) > > > > > It turns out this is a lock contention issue. > > The code blocks waiting for a lock that will never be freed. The device_register() code blocks? Or something else? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Behaviour of device_register 2008-03-06 16:30 ` Greg KH @ 2008-03-06 17:51 ` Adrian McMenamin 0 siblings, 0 replies; 5+ messages in thread From: Adrian McMenamin @ 2008-03-06 17:51 UTC (permalink / raw) To: Greg KH; +Cc: Adrian McMenamin, LKML, linux-sh On Thu, March 6, 2008 4:30 pm, Greg KH wrote: > On Thu, Mar 06, 2008 at 12:31:21PM -0000, Adrian McMenamin wrote: >> On Wed, March 5, 2008 11:46 pm, Greg KH wrote: >> > On Wed, Mar 05, 2008 at 11:25:48PM +0000, Adrian McMenamin wrote: >> >> The observed behaviour for me is that it appears to be blocking the >> >> vblank interrupt on my box (or more accurately stopping the workqueue >> >> that the interrupt handler calls from running). And without the >> vblank >> >> my bus won't process dma and so therefore the attempt to register the >> >> device in question fails. >> >> >> >> But I can see no reason from a glance over the code why that (vblanks >> >> being blocked) would be the case - have I missed something and the >> >> vblanks will be blocked, or should I be looking elsewhere for the >> root >> >> cause of this problem? >> > >> > device_register(), on it's own, does not touch any hardware, nor >> prevent >> > anything else in the kernel from happening. >> > >> > So I think you need to look elsewhere, like into the bus that is doing >> > the device_register() call :) >> > >> >> >> It turns out this is a lock contention issue. >> >> The code blocks waiting for a lock that will never be freed. > > The device_register() code blocks? Or something else? > No my code. The hotplug event results in a message which is stored in a linked list which is protected by a lock. To query the device I need to queue a message in that linked list which is obviously locked. So everything is timed out. I need to make the device query asychronous from the hotplug. Not perfect, but the only memory safe way of doing it I think. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-03-06 18:00 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-03-05 23:25 Behaviour of device_register Adrian McMenamin 2008-03-05 23:46 ` Greg KH 2008-03-06 12:31 ` Adrian McMenamin 2008-03-06 16:30 ` Greg KH 2008-03-06 17:51 ` Adrian McMenamin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox