All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: Jonathan Cameron <jic23@cam.ac.uk>
Cc: linux-iio@vger.kernel.org, Michael.Hennerich@analog.com
Subject: Re: [RFC PATCH 0/5] Add kfifo based buffer implementation
Date: Sat, 05 Feb 2011 19:48:12 +0000	[thread overview]
Message-ID: <4D4DA97C.7000409@cam.ac.uk> (raw)
In-Reply-To: <1292790825-19156-1-git-send-email-jic23@cam.ac.uk>

On 12/19/10 20:33, Jonathan Cameron wrote:
> This set is an update of the proof of concept I wrote a while back.
> This time around I've simply used a byte stream buffer rather than
> variable record sizes.  The first patch pushes some of the
> exiting buffer code down into the ring_sw implementation to
> make it simpler to provide other implementations.
> 
> What you gain by picking kfifo:
> * Clean fast code for the underlying buffer.
> 
> What you loose:
> * Events - userspace has to 'know' how often to read the buffer
>   so as to not loose data.
> 
> Obvious difference is it is a fifo rather than a ring buffer.
> 
> This buffer should also lend itself to a simple implementation
> of a store_n function which should be useful for devices with
> a hardware ring which we then want to feed into a software one.

If anyone has time to take a look at this, it would be great to
get some feedback. If not I propose merging it anyway soon.
There is still work to be done to get this to an optimal state, but
right now it works so might as well make it available.

I fear my sw_ring implementation is one of the main blockers to moving
IIO out of staging so would like to show how easy it is to use
alternatives.  On that note we should probably have some documentation
to provide a clear explanation of when to pick one buffer over another.

The 'What option should a distro use?' question Greg raised the other
day will here be controlled by driver writers setting a suitable
default buffer choice if they implement multiple options.
> 
> Jonathan Cameron (5):
>   staging:iio:buffering  move the copy to user on rip down into
>     implementations
>   staging:iio:kfifo buffer implementation
>   staging:iio:lis3l02dq allow buffer implementation selection
>   staging:iio: update example to handle case with no ring events
>   staging:iio: buffer example - add lots more runtime parameters
> 
>  drivers/staging/iio/Documentation/generic_buffer.c |   63 +++++--
>  drivers/staging/iio/Kconfig                        |    6 +
>  drivers/staging/iio/Makefile                       |    1 +
>  drivers/staging/iio/accel/Kconfig                  |   23 +++-
>  drivers/staging/iio/accel/lis3l02dq.h              |   10 +
>  drivers/staging/iio/accel/lis3l02dq_ring.c         |    9 +-
>  drivers/staging/iio/industrialio-ring.c            |   23 +--
>  drivers/staging/iio/kfifo_buf.c                    |  196 ++++++++++++++++++++
>  drivers/staging/iio/kfifo_buf.h                    |   56 ++++++
>  drivers/staging/iio/ring_generic.h                 |    2 +-
>  drivers/staging/iio/ring_sw.c                      |   29 ++-
>  drivers/staging/iio/ring_sw.h                      |    4 +-
>  12 files changed, 363 insertions(+), 59 deletions(-)
>  create mode 100644 drivers/staging/iio/kfifo_buf.c
>  create mode 100644 drivers/staging/iio/kfifo_buf.h
> 

  parent reply	other threads:[~2011-02-05 19:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-19 20:33 [RFC PATCH 0/5] Add kfifo based buffer implementation Jonathan Cameron
2010-12-19 20:33 ` [PATCH 1/5] staging:iio:buffering move the copy to user on rip down into implementations Jonathan Cameron
2010-12-19 20:33 ` [PATCH 2/5] staging:iio:kfifo buffer implementation Jonathan Cameron
2010-12-19 20:33 ` [PATCH 3/5] staging:iio:lis3l02dq allow buffer implementation selection Jonathan Cameron
2010-12-19 20:33 ` [PATCH 4/5] staging:iio: update example to handle case with no ring events Jonathan Cameron
2010-12-19 20:33 ` [PATCH 5/5] staging:iio: buffer example - add lots more runtime parameters Jonathan Cameron
2011-02-05 19:48 ` Jonathan Cameron [this message]
2011-02-07 10:25   ` [RFC PATCH 0/5] Add kfifo based buffer implementation Hennerich, Michael
2011-02-08 20:36   ` Hennerich, Michael

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=4D4DA97C.7000409@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=Michael.Hennerich@analog.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.