Skip to contentSkip to conversation

Lost interrupts

Xenomai Jesper Christensen 3 participants 7 messages Apr 23, 2013 – Apr 24, 2013

lore
Share & tools
lore
#0 lore raw

Hi guys

I have a quick question regarding rtdm synchronisation. Is it possible to "loose" an interrupt if it is generated while i am inside a critical section protected by a rtdm_lock_get_irqsave/rtdm_lock_put_irqrestore?

I have a problem with an ethernet driver where the Tx Queue fills up and i suspect that its because the Tx ISR isn't being executed for the above mentioned reason.

/Jesper

#1 lore raw
Quoted 9 lines · Jesper Christensen

Hi guys

I have a quick question regarding rtdm synchronisation. Is it possible to "loose" an interrupt if it is generated while i am inside a critical section protected by a rtdm_lock_get_irqsave/rtdm_lock_put_irqrestore?

I have a problem with an ethernet driver where the Tx Queue fills up and i suspect that its because the Tx ISR isn't being executed for the above mentioned reason.

It is very unlikely, the cause could be the driver code instead. What kind of interrupt are we talking about? level or edge?

Signature · 1 line
                                                                Gilles.
#2 lore raw
In reply to Jesper Christensen
Quoted 5 lines · Jesper Christensen

Hi guys

I have a quick question regarding rtdm synchronisation. Is it possible to "loose" an interrupt if it is generated while i am inside a critical section protected by a rtdm_lock_get_irqsave/rtdm_lock_put_irqrestore?

Nope, as Gilles already answered.

Quoted 4 lines

I have a problem with an ethernet driver where the Tx Queue fills up and i suspect that its because the Tx ISR isn't being executed for the above mentioned reason.

Are we talking about a Linux NIC or a real-time device? What is your software stack in general (used components and their versions)?

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux
#3 lore raw
Quoted 8 lines · Jan Kiszka
Quoted 5 lines · Jesper Christensen

Hi guys

I have a quick question regarding rtdm synchronisation. Is it possible to "loose" an interrupt if it is generated while i am inside a critical section protected by a rtdm_lock_get_irqsave/rtdm_lock_put_irqrestore?

Nope, as Gilles already answered.

Quoted 8 lines
Quoted 3 lines

I have a problem with an ethernet driver where the Tx Queue fills up and i suspect that its because the Tx ISR isn't being executed for the above mentioned reason.

Are we talking about a Linux NIC or a real-time device? What is your software stack in general (used components and their versions)?

Jan

Its a real time device (ETSEC on a MPC8520) with xenomai 2.5.6 on a linux-2.6.29.6 and ipipe-2.7-04 and the stack is rtnet-0.9.12. The ipipe patch has minor modifications to make it apply to the freescale patched version of the linux source. The rtnet source also has several (heavier) modifications (scattered skbs, etc.).

So if an interrupt occurs during a critical section, the ISR will run upon exit from that section?

Quoted 8 lines · Gilles Chanteperdrix
Quoted 6 lines · Jesper Christensen

Hi guys

I have a quick question regarding rtdm synchronisation. Is it possible to "loose" an interrupt if it is generated while i am inside a critical section protected by a rtdm_lock_get_irqsave/rtdm_lock_put_irqrestore?

Quoted 7 lines
Quoted 3 lines

I have a problem with an ethernet driver where the Tx Queue fills up and i suspect that its because the Tx ISR isn't being executed for the above mentioned reason.

It is very unlikely, the cause could be the driver code instead. What kind of interrupt are we talking about? level or edge?

I believe its a level interrupt, i haven't been able to find any mention of it in the documentation, but the native linux driver reports them as level in /proc/interrupts

/Jesper

#4 lore raw
Quoted 15 lines · Jesper Christensen
Quoted 14 lines · Jan Kiszka
Quoted 5 lines · Jesper Christensen

Hi guys

I have a quick question regarding rtdm synchronisation. Is it possible to "loose" an interrupt if it is generated while i am inside a critical section protected by a rtdm_lock_get_irqsave/rtdm_lock_put_irqrestore?

Nope, as Gilles already answered.

Quoted 3 lines

I have a problem with an ethernet driver where the Tx Queue fills up and i suspect that its because the Tx ISR isn't being executed for the above mentioned reason.

Are we talking about a Linux NIC or a real-time device? What is your software stack in general (used components and their versions)?

Quoted 8 lines
Quoted 2 lines

Jan

Its a real time device (ETSEC on a MPC8520) with xenomai 2.5.6 on a linux-2.6.29.6 and ipipe-2.7-04 and the stack is rtnet-0.9.12. The ipipe patch has minor modifications to make it apply to the freescale patched version of the linux source. The rtnet source also has several (heavier) modifications (scattered skbs, etc.).

That introduces a lot of variations and potential breakage points. You will have to debug through them.

Quoted 3 lines

So if an interrupt occurs during a critical section, the ISR will run upon exit from that section?

Critical RT sections disable interrupts in hardware. And common CPUs keep interrupts pending that arrive while delivery is disabled, replaying them once the OS reenables them again.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux
#5 lore raw
Quoted 18 lines · Jan Kiszka
Quoted 17 lines · Jesper Christensen
Quoted 16 lines · Jan Kiszka
Quoted 5 lines · Jesper Christensen

Hi guys

I have a quick question regarding rtdm synchronisation. Is it possible to "loose" an interrupt if it is generated while i am inside a critical section protected by a rtdm_lock_get_irqsave/rtdm_lock_put_irqrestore?

Nope, as Gilles already answered.

Quoted 3 lines

I have a problem with an ethernet driver where the Tx Queue fills up and i suspect that its because the Tx ISR isn't being executed for the above mentioned reason.

Are we talking about a Linux NIC or a real-time device? What is your software stack in general (used components and their versions)?

Jan

Quoted 7 lines
Quoted 5 lines

Its a real time device (ETSEC on a MPC8520) with xenomai 2.5.6 on a linux-2.6.29.6 and ipipe-2.7-04 and the stack is rtnet-0.9.12. The ipipe patch has minor modifications to make it apply to the freescale patched version of the linux source. The rtnet source also has several (heavier) modifications (scattered skbs, etc.).

That introduces a lot of variations and potential breakage points. You will have to debug through them.

Agreed :)

Quoted 5 lines
Quoted 2 lines

So if an interrupt occurs during a critical section, the ISR will run upon exit from that section?

Critical RT sections disable interrupts in hardware. And common CPUs keep interrupts pending that arrive while delivery is disabled, replaying them once the OS reenables them again.

Great, thank you for your time Jan and Gilles.

Quoted 2 lines

Jan

#6 lore raw
In reply to Jan Kiszka
Quoted 8 lines · Jan Kiszka
Quoted 5 lines · Jesper Christensen

Hi guys

I have a quick question regarding rtdm synchronisation. Is it possible to "loose" an interrupt if it is generated while i am inside a critical section protected by a rtdm_lock_get_irqsave/rtdm_lock_put_irqrestore?

Nope, as Gilles already answered.

Quoted 8 lines
Quoted 3 lines

I have a problem with an ethernet driver where the Tx Queue fills up and i suspect that its because the Tx ISR isn't being executed for the above mentioned reason.

Are we talking about a Linux NIC or a real-time device? What is your software stack in general (used components and their versions)?

Jan

Its a real time device (ETSEC on a MPC8572) with xenomai 2.5.6 on a linux-2.6.29.6 and ipipe-2.7-04 and the stack is rtnet-0.9.12. The ipipe patch has minor modifications to make it apply to the freescale patched version of the linux source. The rtnet source also has several (heavier) modifications (scattered skbs, etc.).

So if an interrupt occurs during a critical section, the ISR will run upon exit from that section?

Quoted 8 lines · Gilles Chanteperdrix
Quoted 6 lines · Jesper Christensen

Hi guys

I have a quick question regarding rtdm synchronisation. Is it possible to "loose" an interrupt if it is generated while i am inside a critical section protected by a rtdm_lock_get_irqsave/rtdm_lock_put_irqrestore?

Quoted 7 lines
Quoted 3 lines

I have a problem with an ethernet driver where the Tx Queue fills up and i suspect that its because the Tx ISR isn't being executed for the above mentioned reason.

It is very unlikely, the cause could be the driver code instead. What kind of interrupt are we talking about? level or edge?

I believe its a level interrupt, i haven't been able to find any mention of it in the documentation, but the native linux driver reports them as level in /proc/interrupts

/Jesper