Skip to contentSkip to conversation

Can we conditionally force threading irq with primary and thread handler?

DISCUSSION Yunhong Jiang 2 participants 3 messages Dec 3, 2015

lore
Share & tools
lore
#0 lore raw

Hi, Thomas
On Commit 2a1d3ab8986d1b2 ("genirq: Handle force threading of irqs
with primary and thread handler"), even if the caller of request_threaded_irq() provides a primary handler, that primary handler will be invoked in thread context. This may cause some latency issue for high real time requirement.

	I checked the discussion on https://lkml.org/lkml/2015/9/19/372 with 

Okuno and seems we need this change only if the irq is shared, otherwise, we can still use Okuno's mechanism, am I right? Do you think it's ok to force the primary handler for shared IRQ, otherwise, clear the IRQF_ONESHOT?

If yes, I will cook a patch for it.

Thanks
--jyh

#1 lore raw

Yunhong,

Quoted 11 lines · Yunhong Jiang

Hi, Thomas
On Commit 2a1d3ab8986d1b2 ("genirq: Handle force threading of irqs
with primary and thread handler"), even if the caller of request_threaded_irq() provides a primary handler, that primary handler will be invoked in thread context. This may cause some latency issue for high real time requirement.

	I checked the discussion on https://lkml.org/lkml/2015/9/19/372 with 

Okuno and seems we need this change only if the irq is shared, otherwise, we can still use Okuno's mechanism, am I right? Do you think it's ok to force the primary handler for shared IRQ, otherwise, clear the IRQF_ONESHOT?

If you want to avoid that the primary handler is force threaded, then you can indicate that with IRQF_NO_THREAD.

Thanks,

tglx

#2 lore raw
Quoted 11 lines · Thomas Gleixner

Yunhong,

Quoted 7 lines · Yunhong Jiang

Hi, Thomas
On Commit 2a1d3ab8986d1b2 ("genirq: Handle force threading of irqs
with primary and thread handler"), even if the caller of request_threaded_irq() provides a primary handler, that primary handler will be invoked in thread context. This may cause some latency issue for high real time requirement.

Quoted 7 lines
Quoted 4 lines
	I checked the discussion on https://lkml.org/lkml/2015/9/19/372 with 

Okuno and seems we need this change only if the irq is shared, otherwise, we can still use Okuno's mechanism, am I right? Do you think it's ok to force the primary handler for shared IRQ, otherwise, clear the IRQF_ONESHOT?

If you want to avoid that the primary handler is force threaded, then you can indicate that with IRQF_NO_THREAD.

Thaks for reply.
Sure, will do that way. Just feel a bit weird with a valid thread_fn and a IRQF_NO_THREAD flags.

Thanks
--jyh

Quoted 6 lines

Thanks,

tglx