All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hubert Talbot" <Hubert.Talbot@domain.hid>
To: xenomai@xenomai.org
Subject: [Xenomai-help] Rép. : Re:  Non RT PCI device driver vs interrupts (go with rtdm...)
Date: Mon, 25 Feb 2008 11:54:53 -0500	[thread overview]
Message-ID: <47C2AC8D0200000100192941@domain.hid> (raw)
In-Reply-To: <47C278F3.1060309@domain.hid>

Hi Jan,

I am looking for realtime solution.

As I said before, I want to make a proof-of-concept with Xenomai.

Here is my use case:

A "Fluke 741B Documenting Process Calibrator"
(http://ca.fluke.com/caen/products/Fluke+741B.htm?catalog_name=FlukeCanada&Category=PCL(FlukeProducts)) 
sends pusle to I/O Sensoray 626 card. On pulse reception, card generates interrupt which is processed by an rt_task.

The program is simple. Mainly, it initialzes the board and creates two rt_task.
One for interrupt processing and the other for "sleeping" (2 secs).

The interrupt processing rt_task looks like:

while (!end)
{
   rt_intr_wait();
   S626_InterruptStatus();
   if (status)
   {
      ++count;
   }
   S626_DIOCapReset()
   S626_InterruptEnable()
}

The calls to S626_ functions ends up to ioctl calls.

I think that calling these functions leads to execution mode switches.

Running program for different frequencies gives after two seconds:

     pulse (KHz)           count          expected        lost (%)
      
          1                      2001            2000               ---
          2                      3996            4000               0.1
          3                      5989            6000               0.18
          4                      7975            8000               0.3125
          5                      9581            10000             4.19
          12                    10454          24000             56.44
          20                    12058          40000             69.86

Processing interrupts is the first step of the proof-of-concept.


Thanks

Hubert


>>> Jan Kiszka <jan.kiszka@domain.hid> 2008-02-25 03:14 >>>
Hubert Talbot wrote:
> Finally, I got the precision I expected. The problem was on the way the results were reported.
> 
> However, more the frequency of the pulse generator is raised, less the results are good.
> 
> I think it is time to go with rtdm...

RTDM is no magic bullet /wrt latency or jitter. You should try to 
understand what you are measuring first before blindly replacing 
something. I'm surely not saying porting to RTDM is a bad idea, but I 
may not help you with what you are actually looking for.

What do you mean with "less good"? What frequencies are we talking 
about? What is the critical code path (already considered to use some 
tracing tool for analysis?)?

Jan





      reply	other threads:[~2008-02-25 16:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-22 19:13 [Xenomai-help] Non RT PCI device driver vs interrupts (go with rtdm...) Hubert Talbot
2008-02-25  8:14 ` Jan Kiszka
2008-02-25 16:54   ` Hubert Talbot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47C2AC8D0200000100192941@domain.hid \
    --to=hubert.talbot@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.