All of lore.kernel.org
 help / color / mirror / Atom feed
* Interrupt Latency 2.6.33.7 rt30
@ 2011-08-25 21:03 Christian Kraus
  2011-08-26  7:48 ` Uwe Kleine-König
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Kraus @ 2011-08-25 21:03 UTC (permalink / raw)
  To: linux-rt-users

Hello
I have wrote a GPIO-driver, that toggle the value of a GPIO when a 
interrupt is comming from an another GPIO.
When I measure the latency between the interrupt and the toggled Pin 
it's about ten times higher than without the rt-patch.
(without Patch = 8-11 us
  with Patch = 30-110 us)

Can anybody help me please?

I have a Beagleboard with an Omap-Arm running.

Here are the changes in gpio_keys.c:

static irqreturn_t gpio_keys_isr(int irq, void *dev_id)
{
     struct gpio_button_data *bdata = dev_id;
     struct gpio_keys_button *button = bdata->button;

     BUG_ON(irq != gpio_to_irq(button->gpio));

     if (button->debounce_interval)
     {
         mod_timer(&bdata->timer,
             jiffies + msecs_to_jiffies(button->debounce_interval));



     }
     else
     {
     //    schedule_work(&bdata->work);

         if(gpio_get_value(158)==0)
         {
             gpio_set_value(158, 1);
         }
         else
         {
             gpio_set_value(158, 0);
         }


     }

     return IRQ_HANDLED;
}


Thx Christian


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

* Re: Interrupt Latency 2.6.33.7 rt30
  2011-08-25 21:03 Interrupt Latency 2.6.33.7 rt30 Christian Kraus
@ 2011-08-26  7:48 ` Uwe Kleine-König
  2011-09-01 19:11   ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: Uwe Kleine-König @ 2011-08-26  7:48 UTC (permalink / raw)
  To: Christian Kraus; +Cc: linux-rt-users

On Thu, Aug 25, 2011 at 11:03:33PM +0200, Christian Kraus wrote:
> Hello
> I have wrote a GPIO-driver, that toggle the value of a GPIO when a
> interrupt is comming from an another GPIO.
> When I measure the latency between the interrupt and the toggled Pin
> it's about ten times higher than without the rt-patch.
> (without Patch = 8-11 us
>  with Patch = 30-110 us)
It's expected and known that an rt kernel has a worse average latency.
Having said that I cannot say if the increase you see is "too much".

The best option you have is asking ftrace what happens in these 30-110
us after making sure you have a decent sched_clock implementation.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Interrupt Latency 2.6.33.7 rt30
  2011-08-26  7:48 ` Uwe Kleine-König
@ 2011-09-01 19:11   ` Thomas Gleixner
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Gleixner @ 2011-09-01 19:11 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Christian Kraus, linux-rt-users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 919 bytes --]

On Fri, 26 Aug 2011, Uwe Kleine-König wrote:

> On Thu, Aug 25, 2011 at 11:03:33PM +0200, Christian Kraus wrote:
> > Hello
> > I have wrote a GPIO-driver, that toggle the value of a GPIO when a
> > interrupt is comming from an another GPIO.
> > When I measure the latency between the interrupt and the toggled Pin
> > it's about ten times higher than without the rt-patch.
> > (without Patch = 8-11 us
> >  with Patch = 30-110 us)
> It's expected and known that an rt kernel has a worse average latency.

Nonsense.

> Having said that I cannot say if the increase you see is "too much".
> 
> The best option you have is asking ftrace what happens in these 30-110
> us after making sure you have a decent sched_clock implementation.

The problem is simply that the interrupt is forced threaded, so it
depends on the scheduler when it goes on the CPU, while on !RT the
code runs in hard interrupt context.

Thanks,

	tglx

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

end of thread, other threads:[~2011-09-01 19:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-25 21:03 Interrupt Latency 2.6.33.7 rt30 Christian Kraus
2011-08-26  7:48 ` Uwe Kleine-König
2011-09-01 19:11   ` Thomas Gleixner

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.