ioctl alternative (linux)

Discussion in 'C Programming' started by Nico Coesel, Feb 23, 2012.

  1. Nico Coesel

    Nico Coesel Guest

    I'm looking for a faster alternative to talk to a device driver. I
    noticed every ioctl call takes about 20ms. This is way too slow for my
    purpose. Any hints?

    --
    Failure does not prove something is impossible, failure simply
    indicates you are not using the right tools...
    nico@nctdevpuntnl (punt=.)
    --------------------------------------------------------------
    Nico Coesel, Feb 23, 2012
    #1
    1. Advertising

  2. Nico Coesel

    Joe Pfeiffer Guest

    (Nico Coesel) writes:

    > I'm looking for a faster alternative to talk to a device driver. I
    > noticed every ioctl call takes about 20ms. This is way too slow for my
    > purpose. Any hints?


    First hint would be to take it to a Linux group. This one is about the
    C programming language.

    Second would be to give some more details: why is it too long? Is this
    a driver you're writing, or one that is part of your distribution?
    Joe Pfeiffer, Feb 23, 2012
    #2
    1. Advertising

  3. Nico Coesel

    Jorgen Grahn Guest

    [Followup-To: comp.os.linux.development.system]

    On Thu, 2012-02-23, Joe Pfeiffer wrote:
    > (Nico Coesel) writes:
    >
    >> I'm looking for a faster alternative to talk to a device driver. I
    >> noticed every ioctl call takes about 20ms. This is way too slow for my
    >> purpose. Any hints?

    >
    > First hint would be to take it to a Linux group.


    Like comp.os.linux.development.system. Followup set.

    > C programming language.
    >
    > Second would be to give some more details: why is it too long? Is this
    > a driver you're writing, or one that is part of your distribution?


    One reflection: 20 ms seems insanely long, unless this is some
    extremely low-powered embedded system. I know I've done ioctl's at a
    rate of 1e+05 to 1e+06 per second or so on recent-ish PC hardware --
    and these ioctls also did plenty of work. (Not that I think it's a
    good idea to do system calls at this insane rate, but I couldn't
    change the design.)

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Oo o. . .
    \X/ snipabacken.se> O o .
    Jorgen Grahn, Feb 23, 2012
    #3
  4. Nico Coesel

    Nico Coesel Guest

    Joe Pfeiffer <> wrote:

    > (Nico Coesel) writes:
    >
    >> I'm looking for a faster alternative to talk to a device driver. I
    >> noticed every ioctl call takes about 20ms. This is way too slow for my
    >> purpose. Any hints?

    >
    >First hint would be to take it to a Linux group. This one is about the
    >C programming language.


    I tried to find one but most of the Linux groups appear to be 'dead'.

    >Second would be to give some more details: why is it too long? Is this
    >a driver you're writing, or one that is part of your distribution?


    I found the problem. A sleep (which shouldn't be there) in one of the
    drivers was the culprit.

    --
    Failure does not prove something is impossible, failure simply
    indicates you are not using the right tools...
    nico@nctdevpuntnl (punt=.)
    --------------------------------------------------------------
    Nico Coesel, Feb 24, 2012
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roger
    Replies:
    1
    Views:
    3,681
    Christophe Vanfleteren
    Oct 22, 2003
  2. Javier
    Replies:
    1
    Views:
    860
    Thomas Heller
    Oct 30, 2003
  3. Peter Luciak

    ioctl(2) ?

    Peter Luciak, Apr 24, 2004, in forum: Python
    Replies:
    1
    Views:
    555
    Peter Hansen
    Apr 24, 2004
  4. Replies:
    1
    Views:
    3,960
    red floyd
    Jan 13, 2009
  5. Replies:
    2
    Views:
    156
    Arndt Jonasson
    Jan 13, 2005
Loading...

Share This Page