Re: [PATCH] pcf50633: use a dedicated workqueue for irq processing

From: Mark Brown
Date: Fri Jul 31 2009 - 06:46:02 EST


On Thu, Jul 30, 2009 at 03:34:25PM -0700, Andrew Morton wrote:

> The patch looks reasonable, but creating yet another kernel thread is a
> bit sad. And I suspect that other MFD drivers are doing the same thing
> as pcf50633-core.c, in which case we should change those as well?

It's just pcf50633 that's immediately affected from the looks of it.
What's going wrong for it is that it's using interrupts from the device
to determine when an ADC conversion is complete and since it's an I2C
device it's doing interrupt handling in the standard work queue. Other
MFDs that might be affected appear to be already using a separate work
queue or thread for their interrupts which would allow them to push any
work that needs to wait for interrupts from the device into the standard
workqueue.

The issue shouldn't need so much handling by drivers when these I2C/SPI
driven devices can use genirq (which looks likely soon although it's not
possible currently) since then the interrupt handling will occur within
IRQ threads. Devices that can interact with the device from interrupt
context aren't affected since they don't need to defer interrupt
handling to a work queue.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/