All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <plroskin@gmail.com>
To: Jonah Petri <jonah@sense.com>, linux-iio@vger.kernel.org
Subject: Re: Raw data block input: is IIO a good choice?
Date: Fri, 7 Apr 2017 18:47:05 -0700	[thread overview]
Message-ID: <CAN_72e0u+fgOB9TmvP55pDLOC1Z9vGYnNj5Zpogc1b-K7xW7WA@mail.gmail.com> (raw)
In-Reply-To: <23293209-00F9-4D1E-8822-00B3B267EF79@sense.com>

Hi Jonah,

Thank you for reply! There is no DMA. The ring buffer is implemented
in FPGA. It is mapped to the CPU memory. It has space for 64 messages.
That is, if the userspace doesn't read data for 64/50 = 1.28 seconds,
there will be lost data. It is possible to set up an interrupt as a
certain watermark, e.g. when half of the buffers are utilized. But I
expect that the userspace utility will be polling the driver for new
messages and will read them before the interrupt is triggered.

I'm not sure if a buffer in the kernel space would be needed. It would
be nice to save the data in case if the userspace software is slow.
But I don't see that as a hard requirement. If the userspace utility
sleeps for over a second, I would be in trouble, with or without
kernel buffering.

I don't want to do any processing in the kernel space. So the driver
would have one "channel" spitting out 256 byte long opaque packets.

I'm sure there are tons of ways to get that data to the userspace, I
just want to select a subsystem that would cause less frustration and
"impedance mismatch".

-- 
Regards,
Pavel Roskin

  reply	other threads:[~2017-04-08  1:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-07 21:48 Raw data block input: is IIO a good choice? Pavel Roskin
2017-04-08  0:20 ` Jonah Petri
2017-04-08  1:47   ` Pavel Roskin [this message]
2017-04-08  3:10     ` Jonah Petri
2017-04-08  6:13       ` Pavel Roskin
2017-04-08 14:36         ` Jonathan Cameron
2017-04-11 21:01           ` Pavel Roskin
2017-04-12  0:05             ` Pavel Roskin
2017-04-12 14:36               ` Jonathan Cameron

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=CAN_72e0u+fgOB9TmvP55pDLOC1Z9vGYnNj5Zpogc1b-K7xW7WA@mail.gmail.com \
    --to=plroskin@gmail.com \
    --cc=jonah@sense.com \
    --cc=linux-iio@vger.kernel.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.