All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] Lost interrupts
@ 2013-04-23  9:22 Jesper Christensen
  2013-04-23 11:21 ` Gilles Chanteperdrix
  2013-04-23 12:19 ` Jan Kiszka
  0 siblings, 2 replies; 7+ messages in thread
From: Jesper Christensen @ 2013-04-23  9:22 UTC (permalink / raw)
  To: xenomai

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


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

* Re: [Xenomai] Lost interrupts
  2013-04-23  9:22 [Xenomai] Lost interrupts Jesper Christensen
@ 2013-04-23 11:21 ` Gilles Chanteperdrix
  2013-04-23 12:19 ` Jan Kiszka
  1 sibling, 0 replies; 7+ messages in thread
From: Gilles Chanteperdrix @ 2013-04-23 11:21 UTC (permalink / raw)
  To: Jesper Christensen; +Cc: xenomai

On 04/23/2013 11:22 AM, Jesper Christensen wrote:

> 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?


-- 
                                                                Gilles.


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

* Re: [Xenomai] Lost interrupts
  2013-04-23  9:22 [Xenomai] Lost interrupts Jesper Christensen
  2013-04-23 11:21 ` Gilles Chanteperdrix
@ 2013-04-23 12:19 ` Jan Kiszka
  2013-04-24  7:39   ` Jesper Christensen
  2013-04-24  7:39   ` Jesper Christensen
  1 sibling, 2 replies; 7+ messages in thread
From: Jan Kiszka @ 2013-04-23 12:19 UTC (permalink / raw)
  To: Jesper Christensen; +Cc: xenomai

On 2013-04-23 11:22, Jesper Christensen wrote:
> 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.

> 
> 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

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux


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

* Re: [Xenomai] Lost interrupts
  2013-04-23 12:19 ` Jan Kiszka
@ 2013-04-24  7:39   ` Jesper Christensen
  2013-04-24  7:52     ` Jan Kiszka
  2013-04-24  7:39   ` Jesper Christensen
  1 sibling, 1 reply; 7+ messages in thread
From: Jesper Christensen @ 2013-04-24  7:39 UTC (permalink / raw)
  To: Jan Kiszka, Gilles Chanteperdrix; +Cc: xenomai

On 04/23/2013 02:19 PM, Jan Kiszka wrote:
> On 2013-04-23 11:22, Jesper Christensen wrote:
>> 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.
>
>> 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?

On 04/23/2013 01:21 PM, Gilles Chanteperdrix wrote:
> On 04/23/2013 11:22 AM, Jesper Christensen wrote:
>
>> 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?
>
>
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


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

* Re: [Xenomai] Lost interrupts
  2013-04-23 12:19 ` Jan Kiszka
  2013-04-24  7:39   ` Jesper Christensen
@ 2013-04-24  7:39   ` Jesper Christensen
  1 sibling, 0 replies; 7+ messages in thread
From: Jesper Christensen @ 2013-04-24  7:39 UTC (permalink / raw)
  To: Jan Kiszka, Gilles Chanteperdrix; +Cc: xenomai

On 04/23/2013 02:19 PM, Jan Kiszka wrote:
> On 2013-04-23 11:22, Jesper Christensen wrote:
>> 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.
>
>> 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?

On 04/23/2013 01:21 PM, Gilles Chanteperdrix wrote:
> On 04/23/2013 11:22 AM, Jesper Christensen wrote:
>
>> 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?
>
>
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


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

* Re: [Xenomai] Lost interrupts
  2013-04-24  7:39   ` Jesper Christensen
@ 2013-04-24  7:52     ` Jan Kiszka
  2013-04-24  8:21       ` Jesper Christensen
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2013-04-24  7:52 UTC (permalink / raw)
  To: Jesper Christensen; +Cc: xenomai@xenomai.org

On 2013-04-24 09:39, Jesper Christensen wrote:
> On 04/23/2013 02:19 PM, Jan Kiszka wrote:
>> On 2013-04-23 11:22, Jesper Christensen wrote:
>>> 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.
>>
>>> 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.).

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

> 
> 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

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux


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

* Re: [Xenomai] Lost interrupts
  2013-04-24  7:52     ` Jan Kiszka
@ 2013-04-24  8:21       ` Jesper Christensen
  0 siblings, 0 replies; 7+ messages in thread
From: Jesper Christensen @ 2013-04-24  8:21 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai@xenomai.org

On 04/24/2013 09:52 AM, Jan Kiszka wrote:
> On 2013-04-24 09:39, Jesper Christensen wrote:
>> On 04/23/2013 02:19 PM, Jan Kiszka wrote:
>>> On 2013-04-23 11:22, Jesper Christensen wrote:
>>>> 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.
>>>
>>>> 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.).
> That introduces a lot of variations and potential breakage points. You
> will have to debug through them.
Agreed :)
>> 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.
> Jan
>



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

end of thread, other threads:[~2013-04-24  8:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-23  9:22 [Xenomai] Lost interrupts Jesper Christensen
2013-04-23 11:21 ` Gilles Chanteperdrix
2013-04-23 12:19 ` Jan Kiszka
2013-04-24  7:39   ` Jesper Christensen
2013-04-24  7:52     ` Jan Kiszka
2013-04-24  8:21       ` Jesper Christensen
2013-04-24  7:39   ` Jesper Christensen

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.