All of lore.kernel.org
 help / color / mirror / Atom feed
* When to use threaded interrupts?
@ 2015-09-10 17:49 Kosta Zertsekel
  2015-09-10 20:09 ` Rami Rosen
  0 siblings, 1 reply; 6+ messages in thread
From: Kosta Zertsekel @ 2015-09-10 17:49 UTC (permalink / raw)
  To: kernelnewbies

Hi guys,

I hope I'm on right mailing list. :-)
I think I get the pro of using threaded interrupts - to decrease the maximum
interrupt latency on RT workloads and/or RT machines (servers, embedded,
etc.).

Also, I see that in 4.2 there are only ~76 drivers that use threaded
interrupt:
```
$ git grep -l IRQ_WAKE_THREAD | sort | grep -v "\.h" | wc -l
76
```

?So, I'd like to ask:
   - Why not **all** of the drivers use the threaded interrupts?
   - What are the cons of the threaded interrupts??

Thanks,
--- KostaZ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150910/11ea411f/attachment.html 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* When to use threaded interrupts?
  2015-09-10 17:49 When to use threaded interrupts? Kosta Zertsekel
@ 2015-09-10 20:09 ` Rami Rosen
  2015-09-13  6:24   ` Kosta Zertsekel
  0 siblings, 1 reply; 6+ messages in thread
From: Rami Rosen @ 2015-09-10 20:09 UTC (permalink / raw)
  To: kernelnewbies

Kosta,

Just a wild assumption: maybe the cost of incurring context switches ?
(comparing to tasklets)

Best Regards,
Rami Rosen
http://ramirose.wix.com/ramirosen



On 10 September 2015 at 20:49, Kosta Zertsekel <zertsekel@gmail.com> wrote:
> Hi guys,
>
> I hope I'm on right mailing list. :-)
> I think I get the pro of using threaded interrupts - to decrease the maximum
> interrupt latency on RT workloads and/or RT machines (servers, embedded,
> etc.).
>
> Also, I see that in 4.2 there are only ~76 drivers that use threaded
> interrupt:
> ```
> $ git grep -l IRQ_WAKE_THREAD | sort | grep -v "\.h" | wc -l
> 76
> ```
>
> So, I'd like to ask:
>    - Why not **all** of the drivers use the threaded interrupts?
>    - What are the cons of the threaded interrupts?
>
> Thanks,
> --- KostaZ
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* When to use threaded interrupts?
  2015-09-10 20:09 ` Rami Rosen
@ 2015-09-13  6:24   ` Kosta Zertsekel
  2015-09-13 11:16     ` Rami Rosen
  0 siblings, 1 reply; 6+ messages in thread
From: Kosta Zertsekel @ 2015-09-13  6:24 UTC (permalink / raw)
  To: kernelnewbies

?>> I think I get the pro of using threaded interrupts - to decrease the
maximum
>> interrupt latency on RT workloads and/or RT machines (servers, embedded,
>> etc.).
?>> So, I'd like to ask:
>>    - Why not **all** of the drivers use the threaded interrupts?
>>    - What are the cons of the threaded interrupts?
>>
> Just a wild assumption: maybe the cost of incurring context switches ?
> (comparing to tasklets)

I get that threaded IRQ is better than softIrqs because threaded IRQ
supports
priorities. On the other hand, added context switches surely get system
slower.
But from the practical point of view - why on relatively new Intel PC there
are
no threaded irqs at all?

```
$ uname -a
Linux kostaz-OptiPlex-7010 3.19.0-26-generic #28-Ubuntu SMP Tue Aug 11
14:16:32 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
```

--- KostaZ

On Thu, Sep 10, 2015 at 11:09 PM, Rami Rosen <roszenrami@gmail.com> wrote:

> Kosta,
>
> ??
> Just a wild assumption: maybe the cost of incurring context switches ?
> (comparing to tasklets)
>
> Best Regards,
> Rami Rosen
> http://ramirose.wix.com/ramirosen
>
>
>
> On 10 September 2015 at 20:49, Kosta Zertsekel <zertsekel@gmail.com>
> wrote:
> > Hi guys,
> >
> > I hope I'm on right mailing list. :-)
> > I think I get the pro of using threaded interrupts - to decrease the
> maximum
> > interrupt latency on RT workloads and/or RT machines (servers, embedded,
> > etc.).
> >
> > Also, I see that in 4.2 there are only ~76 drivers that use threaded
> > interrupt:
> > ```
> > $ git grep -l IRQ_WAKE_THREAD | sort | grep -v "\.h" | wc -l
> > 76
> > ```
> >
> ??
> > So, I'd like to ask:
> >    - Why not **all** of the drivers use the threaded interrupts?
> >    - What are the cons of the threaded interrupts?
> >
> > Thanks,
> > --- KostaZ
> >
> > _______________________________________________
> > Kernelnewbies mailing list
> > Kernelnewbies at kernelnewbies.org
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150913/88fc95e2/attachment-0001.html 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* When to use threaded interrupts?
  2015-09-13  6:24   ` Kosta Zertsekel
@ 2015-09-13 11:16     ` Rami Rosen
  2015-09-15 18:02       ` Kosta Zertsekel
  0 siblings, 1 reply; 6+ messages in thread
From: Rami Rosen @ 2015-09-13 11:16 UTC (permalink / raw)
  To: kernelnewbies

Kosta,

This kernel and older ones include device drivers which use threaded IRQs
(call request_threaded_irq(), etc).
 For example, many of the driver under drivers/input/touchscreen are
using threaded IRQs:
Following link is from kernel 3.18:
http://lxr.free-electrons.com/source/drivers/input/touchscreen/ucb1400_ts.c?v=3.18

How did you came to the conclusion that this kernel does not support
threaded IRQs ? could it be that you simply do not use device drivers
that
use this mechanism ?

Regards,
Rami Rosen
http://ramirose.wix.com/ramirosen




On 13 September 2015 at 09:24, Kosta Zertsekel <zertsekel@gmail.com> wrote:
>>> I think I get the pro of using threaded interrupts - to decrease the
>>> maximum
>>> interrupt latency on RT workloads and/or RT machines (servers, embedded,
>>> etc.).
>>> So, I'd like to ask:
>>>    - Why not **all** of the drivers use the threaded interrupts?
>>>    - What are the cons of the threaded interrupts?
>>>
>> Just a wild assumption: maybe the cost of incurring context switches ?
>> (comparing to tasklets)
>
> I get that threaded IRQ is better than softIrqs because threaded IRQ
> supports
> priorities. On the other hand, added context switches surely get system
> slower.
> But from the practical point of view - why on relatively new Intel PC there
> are
> no threaded irqs at all?
>
> ```
> $ uname -a
> Linux kostaz-OptiPlex-7010 3.19.0-26-generic #28-Ubuntu SMP Tue Aug 11
> 14:16:32 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
> ```
>
> --- KostaZ
>
> On Thu, Sep 10, 2015 at 11:09 PM, Rami Rosen <roszenrami@gmail.com> wrote:
>>
>> Kosta,
>>
>> Just a wild assumption: maybe the cost of incurring context switches ?
>> (comparing to tasklets)
>>
>> Best Regards,
>> Rami Rosen
>> http://ramirose.wix.com/ramirosen
>>
>>
>>
>> On 10 September 2015 at 20:49, Kosta Zertsekel <zertsekel@gmail.com>
>> wrote:
>> > Hi guys,
>> >
>> > I hope I'm on right mailing list. :-)
>> > I think I get the pro of using threaded interrupts - to decrease the
>> > maximum
>> > interrupt latency on RT workloads and/or RT machines (servers, embedded,
>> > etc.).
>> >
>> > Also, I see that in 4.2 there are only ~76 drivers that use threaded
>> > interrupt:
>> > ```
>> > $ git grep -l IRQ_WAKE_THREAD | sort | grep -v "\.h" | wc -l
>> > 76
>> > ```
>> >
>> > So, I'd like to ask:
>> >    - Why not **all** of the drivers use the threaded interrupts?
>> >    - What are the cons of the threaded interrupts?
>> >
>> > Thanks,
>> > --- KostaZ
>> >
>> > _______________________________________________
>> > Kernelnewbies mailing list
>> > Kernelnewbies at kernelnewbies.org
>> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>> >
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* When to use threaded interrupts?
  2015-09-13 11:16     ` Rami Rosen
@ 2015-09-15 18:02       ` Kosta Zertsekel
  2015-09-15 19:05         ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Kosta Zertsekel @ 2015-09-15 18:02 UTC (permalink / raw)
  To: kernelnewbies

>> On 10 September 2015 at 20:49, Kosta Zertsekel <zertsekel@gmail.com>
>> Also, I see that in 4.2 there are only ~76 drivers that use threaded
>> interrupt:
>> ```
>> $ git grep -l IRQ_WAKE_THREAD | sort | grep -v "\.h" | wc -l
>> 76
>> ```

> On Sun, Sep 13, 2015 at 2:16 PM, Rami Rosen <roszenrami@gmail.com> wrote:
> This kernel and older ones include device drivers which use threaded IRQs
> (call request_threaded_irq(), etc).
> For example, many of the driver under drivers/input/touchscreen are
> using threaded IRQs:
> Following link is from kernel 3.18:
>
http://lxr.free-electrons.com/source/drivers/input/touchscreen/ucb1400_ts.c?v=3.18
>
> How did you came to the conclusion that this kernel does not support
> threaded IRQs ? could it be that you simply do not use device drivers
> that use this mechanism ?

In the given touch screen driver request_threaded_irq() provides NULL
for the thread function pointer. Hence, the non-threaded IRQ mechanism
is actually being used.  This is why I grepped for IRQ_WAKE_THREAD and
not for request_threaded_irq.

So, the questions remains.
Why only ~76 drivers use the threaded IRQ mechanism?
What are the cons of the threaded IRQ mechanism?

Thanks,
--- KostaZ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150915/08d1c2e3/attachment.html 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* When to use threaded interrupts?
  2015-09-15 18:02       ` Kosta Zertsekel
@ 2015-09-15 19:05         ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2015-09-15 19:05 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Sep 15, 2015 at 09:02:24PM +0300, Kosta Zertsekel wrote:
> >> On 10 September 2015 at 20:49, Kosta Zertsekel <zertsekel@gmail.com>
> >> Also, I see that in 4.2 there are only ~76 drivers that use threaded
> >> interrupt:
> >> ```
> >> $ git grep -l IRQ_WAKE_THREAD | sort | grep -v "\.h" | wc -l
> >> 76
> >> ```
> 
> > On Sun, Sep 13, 2015 at 2:16 PM, Rami Rosen <roszenrami@gmail.com> wrote:
> > This kernel and older ones include device drivers which use threaded IRQs
> > (call request_threaded_irq(), etc).
> > For example, many of the driver under drivers/input/touchscreen are
> > using threaded IRQs:
> > Following link is from kernel 3.18:
> > http://lxr.free-electrons.com/source/drivers/input/touchscreen/ucb1400_ts.c?v
> =3.18
> >
> > How did you came to the conclusion that this kernel does not support
> > threaded IRQs ? could it be that you simply do not use device drivers
> > that use this mechanism ?
> 
> In the given touch screen driver request_threaded_irq() provides NULL
> for the thread function pointer. Hence, the non-threaded IRQ mechanism
> is actually being used.? This is why I grepped for IRQ_WAKE_THREAD and
> not for request_threaded_irq.
> 
> So, the questions remains.
> Why only ~76 drivers use the threaded IRQ mechanism?

Because people have not converted older code to the newer mechanism.

> What are the cons of the threaded IRQ mechanism?

Slower throughput and added complexity.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-09-15 19:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-10 17:49 When to use threaded interrupts? Kosta Zertsekel
2015-09-10 20:09 ` Rami Rosen
2015-09-13  6:24   ` Kosta Zertsekel
2015-09-13 11:16     ` Rami Rosen
2015-09-15 18:02       ` Kosta Zertsekel
2015-09-15 19:05         ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.