Kernel configuration problem? Waking up a thread from a hardware intterupt takes too long...

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I am working on an embedded system that my company has developed.  (My
company also developed the driver.)  The problem we're seeing is that
on our embedded system it takes about 100 milliseconds (standard
deviation of 0.5 milliseconds so this is very consistent) to wake up a
thread that is waiting on a hardware interrupt.

However, running the same driver and executable (exact same binaries)
on a desktop (with different kernel configuration) only takes about
half a millisecond.  We also ran tests on our embedded system with
other operating systems (embedded XP and VxWorks) and the delays take
no longer than 3 milliseconds, so we've been able to eliminate the
hardware.

We have also changed part of the kernel configuration and recompiled
the kernel.  When we re-ran the tests with the new kernel, the delays
doubled to about 200 milliseconds.  So we believe the problem is the
kernel configuration.

So my questions are: Has anyone had similar experiences?  Does anyone
have any suggestions for what kernel configuration(s) might be the
culprit(s)?

Thank you for all your help!

- Kevin Hall

Re: Kernel configuration problem? Waking up a thread from a hardware intterupt takes too long!
     snipped-for-privacy@motioneng.com (Kevin Hall) writes:
Quoted text here. Click to load it

What exactly did you change?

Quoted text here. Click to load it

Some random ideas:

- Does your hardware share its interrupt with another device?

- From what you wrote, it seems you are measuring the time
  between interrupt and *user thread* activation. If that is
  the case, then you may also want to measure the time between
  interrupt and *interrupt handler* invocation, so you can
  decide wether those 100ms delays are caused by the interrupt
  handling or by the user thread wakeup mechanism.

- How exactly does your user thread wait for the interrupt,
  i.e. are you using sleep_on()?

- What else is going on in your system (i.e. disk/network activity)
  while you run this test?

HTH

Rob

--
Robert Kaiser                     email: rkaiser AT sysgo DOT com
SYSGO AG                          http://www.elinos.com
We've slightly trimmed the long signature. Click to see the full one.
Re: Kernel configuration problem? Waking up a thread from a hardware intterupt takes too long!
Quoted text here. Click to load it

What is CONFIG_HZ on the two systems?
(That setting was added in
http://www.kernel.org/pub/linux/kernel/people/rml/variable-HZ/v2.4/variable-hz-rml-2.4.20-pre10-ac2-1.patch )
Newer systems use 1000, older systems used 100, I think.
This might explain part of the problem?
- Dan

Site Timeline