rtirq or threadirqs or both?

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
User avatar
funkmuscle
Established Member
Posts: 2801
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 129 times
Been thanked: 31 times

rtirq or threadirqs or both?

Post by funkmuscle »

Hey, something just came to my attention after Rui's release of rtirq.
He said used as an alternative to threadirqs.

I remember years ago setting up my system, an article said that I should use both.

So is this true or should I use one or the other or is both ok? I have both running and have had no issues.

If one or the other, which way do you all recommend?
User avatar
bluzee
Established Member
Posts: 338
Joined: Mon Nov 30, 2020 11:43 pm
Has thanked: 18 times
Been thanked: 88 times

Re: rtirq or threadirqs or both?

Post by bluzee »

threadirqs on the grub command line and rtirq if using a standard kernel. If using a RT patched kernel then only rtirq.
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: rtirq or threadirqs or both?

Post by merlyn »

There was a thread recently where @autostatic was clarifying this.

I think rtirq uses the threaded irqs that threadirqs provides. It seems that you don't need the threadirqs kernel parameter when using a realtime kernel, because threadirqs is already part of the realtime kernel. It was less clear whether you need it for the low-latency kernel. I don't think it would hurt, though.
User avatar
sunrat
Established Member
Posts: 915
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 151 times
Been thanked: 242 times

Re: rtirq or threadirqs or both?

Post by sunrat »

merlyn wrote: Mon Mar 22, 2021 11:09 pm There was a thread recently where @autostatic was clarifying this.
That was this thread in which I plead guilty to leading the topic astray:
viewtopic.php?f=27&t=22864

The conclusion was that threadirqs is not needed for an RT kernel, but needs to be added as a kernel parameter for the Liquorix low-latency kernel I use. Didn't try any other low-latency kernels but autostatic explained in that thread how to determine if threadirqs is active. I did some basic performance testing noted in that thread and threadirqs showed an improvement.

I don't think rtirq script works for non-RT kernels. Edit - it can, see autostatic's disambiguation below.
Last edited by sunrat on Tue Mar 23, 2021 9:11 pm, edited 1 time in total.
User avatar
funkmuscle
Established Member
Posts: 2801
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 129 times
Been thanked: 31 times

Re: rtirq or threadirqs or both?

Post by funkmuscle »

Thank you very much guys. My question is though that I have the vanilla kernel and a real-time one so when I put that in grub for some reason it attaches it to all the kernels in there.
User avatar
sunrat
Established Member
Posts: 915
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 151 times
Been thanked: 242 times

Re: rtirq or threadirqs or both?

Post by sunrat »

funkmuscle wrote: Tue Mar 23, 2021 12:52 am Thank you very much guys. My question is though that I have the vanilla kernel and a real-time one so when I put that in grub for some reason it attaches it to all the kernels in there.
I would guess the RT kernel would ignore it and the vanilla one would implement it in that case.
User avatar
funkmuscle
Established Member
Posts: 2801
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 129 times
Been thanked: 31 times

Re: rtirq or threadirqs or both?

Post by funkmuscle »

sunrat wrote: Tue Mar 23, 2021 2:14 am
funkmuscle wrote: Tue Mar 23, 2021 12:52 am Thank you very much guys. My question is though that I have the vanilla kernel and a real-time one so when I put that in grub for some reason it attaches it to all the kernels in there.
I would guess the RT kernel would ignore it and the vanilla one would implement it in that case.
I hope I gave you a thumbs up and not a thumbs down. Thanks for the answers from everyone.
User avatar
sunrat
Established Member
Posts: 915
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 151 times
Been thanked: 242 times

Re: rtirq or threadirqs or both?

Post by sunrat »

funkmuscle wrote: Tue Mar 23, 2021 2:48 pm I hope I gave you a thumbs up and not a thumbs down. Thanks for the answers from everyone.
It seems the thumbs down symbol only appears if you have already given a thumbs up, so you can remove thanks if you change your mind. ${deity} help us if LM becomes farcebook. :|
And pardon me for not thanking your thanks. The recursive recursiveness would do my head in. :mrgreen:
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: rtirq or threadirqs or both?

Post by autostatic »

merlyn wrote: Mon Mar 22, 2021 11:09 pmI think rtirq uses the threaded irqs that threadirqs provides.
Yes, that's what rtirq is using, you can't put rtirq to full use if you don't have threaded IRQ's as provided by default by a realtime kernel or by a generic kernel with the threadirqs kernel option. Haven't really looked yet at the status of lowlatency kernels when it comes to the use of threadirqs, did a fast check and saw no difference with regard to threaded IRQ's between a realtime kernel and a lowlatency kernel (5.8.0) without the threadirqs option. But I need to double check. And like you said, always adding threadirqs as a kernel option doesn't hurt and that way you're sure you're using threaded IRQ's.
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: rtirq or threadirqs or both?

Post by autostatic »

sunrat wrote: Tue Mar 23, 2021 12:30 amI don't think rtirq script works for non-RT kernels.
It does but only if you use the threadirqs kernel option.
User avatar
sunrat
Established Member
Posts: 915
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 151 times
Been thanked: 242 times

Re: rtirq or threadirqs or both?

Post by sunrat »

autostatic wrote: Tue Mar 23, 2021 8:42 pm
sunrat wrote: Tue Mar 23, 2021 12:30 amI don't think rtirq script works for non-RT kernels.
It does but only if you use the threadirqs kernel option.
Aaah OK. I thought I had tried it but must have been before I added threadirqs to kernel parameters.
Post Reply