* Adjust interrupt Priority for ARM64 GIC @ 2020-08-14 17:10 Dongjiu Geng 2020-09-01 7:48 ` Marc Zyngier 0 siblings, 1 reply; 4+ messages in thread From: Dongjiu Geng @ 2020-08-14 17:10 UTC (permalink / raw) To: marc.zyngier; +Cc: linux-kernel, linuxarm Hi Marc, In the Linux kernel, we can not adjust the interrupt Priority, For all the interrupts, the interrupt Priority are fixed to 0xa0. In some scenarios, it needs to change the Priority. so I want to upstream a serie patch to support to change the Priority through procfs. do you agree I upstream this feature? thanks~ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Adjust interrupt Priority for ARM64 GIC 2020-08-14 17:10 Adjust interrupt Priority for ARM64 GIC Dongjiu Geng @ 2020-09-01 7:48 ` Marc Zyngier 2020-09-01 8:48 ` Dongjiu Geng 0 siblings, 1 reply; 4+ messages in thread From: Marc Zyngier @ 2020-09-01 7:48 UTC (permalink / raw) To: Dongjiu Geng; +Cc: linux-kernel, linuxarm Hi Dongjiu, In the future, please use my kernel.org address, as I don't work for ARM anymore, and would have missed this email if I wasn't pointed to it. On 2020-08-14 18:10, Dongjiu Geng wrote: > Hi Marc, > In the Linux kernel, we can not adjust the interrupt Priority, For > all the interrupts, the interrupt Priority are fixed to 0xa0. > In some scenarios, it needs to change the Priority. so I want to > upstream a serie patch to support to change the Priority through > procfs. do you agree I upstream this feature? thanks~ No, that's not something I would ever consider, and for multiple reasons: - Linux only supports a single priority, meaning that interrupts are themselves aren't preemptable. Dealing with things like (pseudo) NMI is invasive enough, and I can't see a good reason to relax the single priority requirement. - Building on top of the above, the whole scheduler and locking model relies on the non-preemptable property of an interrupt. - I cannot see a good reason to leave the priority control to userspace. That's a sure recipe for userspace-controlled livelocks. Now, I'm sure you want to introduce this for a reason, and you are not explaining it ("some scenarios" doesn't quite cut it). If you care to explain these "scenarios", maybe there is something we can do. But please don't waste time implementing any sort of priority change, there is no way I'll consider it as such. Thanks, M. -- Jazz is not dead. It just smells funny... ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Adjust interrupt Priority for ARM64 GIC 2020-09-01 7:48 ` Marc Zyngier @ 2020-09-01 8:48 ` Dongjiu Geng 2020-09-01 9:06 ` Marc Zyngier 0 siblings, 1 reply; 4+ messages in thread From: Dongjiu Geng @ 2020-09-01 8:48 UTC (permalink / raw) To: Marc Zyngier; +Cc: linux-kernel On 2020/9/1 15:48, Marc Zyngier wrote: > Hi Dongjiu, > > In the future, please use my kernel.org address, as I don't work > for ARM anymore, and would have missed this email if I wasn't pointed > to it. > > On 2020-08-14 18:10, Dongjiu Geng wrote: >> Hi Marc, >> In the Linux kernel, we can not adjust the interrupt Priority, For >> all the interrupts, the interrupt Priority are fixed to 0xa0. >> In some scenarios, it needs to change the Priority. so I want to >> upstream a serie patch to support to change the Priority through >> procfs. do you agree I upstream this feature? thanks~ > > No, that's not something I would ever consider, and for multiple > reasons: > > - Linux only supports a single priority, meaning that interrupts are > themselves aren't preemptable. Dealing with things like (pseudo) NMI > is invasive enough, and I can't see a good reason to relax the > single priority requirement. > > - Building on top of the above, the whole scheduler and locking model > relies on the non-preemptable property of an interrupt. > > - I cannot see a good reason to leave the priority control to userspace. > That's a sure recipe for userspace-controlled livelocks. > > Now, I'm sure you want to introduce this for a reason, and you are not > explaining it ("some scenarios" doesn't quite cut it). If you care to > explain these "scenarios", maybe there is something we can do. Marc, Thanks for answer. In the real-time system(RTOS), we want the timer tick irq is responded as soon as possible to trigger kernel do task schedule. Non-preemptable IRQ decreases the Real-Time Performance of Real-Time Operating System > > But please don't waste time implementing any sort of priority change, > there is no way I'll consider it as such. > > Thanks, > > M. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Adjust interrupt Priority for ARM64 GIC 2020-09-01 8:48 ` Dongjiu Geng @ 2020-09-01 9:06 ` Marc Zyngier 0 siblings, 0 replies; 4+ messages in thread From: Marc Zyngier @ 2020-09-01 9:06 UTC (permalink / raw) To: Dongjiu Geng; +Cc: linux-kernel On 2020-09-01 09:48, Dongjiu Geng wrote: > On 2020/9/1 15:48, Marc Zyngier wrote: >> Hi Dongjiu, >> >> In the future, please use my kernel.org address, as I don't work >> for ARM anymore, and would have missed this email if I wasn't pointed >> to it. >> >> On 2020-08-14 18:10, Dongjiu Geng wrote: >>> Hi Marc, >>> In the Linux kernel, we can not adjust the interrupt Priority, >>> For >>> all the interrupts, the interrupt Priority are fixed to 0xa0. >>> In some scenarios, it needs to change the Priority. so I want to >>> upstream a serie patch to support to change the Priority through >>> procfs. do you agree I upstream this feature? thanks~ >> >> No, that's not something I would ever consider, and for multiple >> reasons: >> >> - Linux only supports a single priority, meaning that interrupts are >> themselves aren't preemptable. Dealing with things like (pseudo) NMI >> is invasive enough, and I can't see a good reason to relax the >> single priority requirement. >> >> - Building on top of the above, the whole scheduler and locking model >> relies on the non-preemptable property of an interrupt. >> >> - I cannot see a good reason to leave the priority control to >> userspace. >> That's a sure recipe for userspace-controlled livelocks. >> >> Now, I'm sure you want to introduce this for a reason, and you are not >> explaining it ("some scenarios" doesn't quite cut it). If you care to >> explain these "scenarios", maybe there is something we can do. > Marc, > Thanks for answer. > In the real-time system(RTOS), we want the timer tick irq is > responded as > soon as possible to trigger kernel do task schedule. Non-preemptable > IRQ decreases the Real-Time Performance of Real-Time Operating System Giving the timer a higher priority doesn't solve anything, really. It just papers over the fact that you are not using threaded interrupts. You also don't explain how you plan to change the scheduler and the whole locking infrastructure to cope with nesting interrupts in the general case. I would suggest you use PREEMPT-RT, where all interrupts are threaded and thus preemptable. M. -- Jazz is not dead. It just smells funny... ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-09-01 9:06 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-08-14 17:10 Adjust interrupt Priority for ARM64 GIC Dongjiu Geng 2020-09-01 7:48 ` Marc Zyngier 2020-09-01 8:48 ` Dongjiu Geng 2020-09-01 9:06 ` Marc Zyngier
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
Powered by JetHome