From: Lars-Peter Clausen <lars@metafoo.de>
To: Octavian Purdila <octavian.purdila@intel.com>,
Jonathan Cameron <jic23@kernel.org>
Cc: Daniel Baluta <daniel.baluta@intel.com>,
Vlad Dogaru <vlad.dogaru@intel.com>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH 0/4] Add valid sample channel
Date: Tue, 25 Nov 2014 19:53:59 +0100 [thread overview]
Message-ID: <5474D047.4040501@metafoo.de> (raw)
In-Reply-To: <CAE1zotLW8NwvorYajRbuVhwps+wJ7c1ezvDNm-X1LkgECKbAcw@mail.gmail.com>
On 11/25/2014 07:27 PM, Octavian Purdila wrote:
> On Tue, Nov 25, 2014 at 7:29 PM, Jonathan Cameron <jic23@kernel.org> wrote:
>>
>>
>> On November 25, 2014 5:00:11 PM GMT+00:00, Lars-Peter Clausen <lars@metafoo.de> wrote:
>>> On 11/25/2014 05:55 PM, Daniel Baluta wrote:
>>>> On Tue, Nov 25, 2014 at 6:36 PM, Lars-Peter Clausen <lars@metafoo.de>
>>> wrote:
>>>>> On 11/25/2014 01:48 PM, Vlad Dogaru wrote:
>>>>>>
>>>>>> This is an attempt to address the problem of buffering in devices
>>> which
>>>>>> have
>>>>>> different scan frequencies for different channels.
>>>>>
>>>>>
>>>>> Will these frequencies still be related or completely arbitrary?
>>>>
>>>> For Kionix KMX61 we have the same set of frequencies for
>>>> accelerometer and magnetometer (12.5, 25, 50, 100 Hz, etc)
>>>> but for example at some point accel can be configured with 100 Hz
>>>> and magnetometer with 12.5Hz.
>>>>
>>>> Does this matter?
>>>
>>> I'm wondering if it makes more sense to register multiple buffers or
>>> devices
>>> if the frequencies are completely unrelated. E.g. in the KMX61 case it
>>> looks
>>> as if its simply two logical devices in the same physical package.
>>>
>>> - Lars
>> That is how we have handled this so far.
>> Sometimes we have separate iio_devices for
>> the logical functions e.g. hid-sensors and sometimes just multiple buffers.. I am
>> struggling to find it now but one of the ADC drivers had a insanely complex nest
>> sampling arrangement requiring 8 buffers. Final driver might have been simplified though... We might still need a few tweaks
>> for multiple buffers not to having naming clashes.... Moving house so only have phone to hand!
>>
>
> The main usage I see for a single device / buffer and multiple
> channels is to reduce the user/kernel context switch overhead in a
> sensor hub environment with lots of sensors (i.e. do a single read
> instead of one for each sensor). The improvements are going to be even
> bigger if the sensor hub supports a hardware buffer.
If those sensors run asynchronously to each other you'll end up with a lot
of padding data which is quite likely going to negate any context switch
overhead reduction.
>
> Some people are quite vocal about that, although I didn't see data
> that can be used to draw a relevant conclusion yet. Time to do some
> experiments, I guess :)
Yes...
next prev parent reply other threads:[~2014-11-25 18:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 12:48 [PATCH 0/4] Add valid sample channel Vlad Dogaru
2014-11-25 12:48 ` [PATCH 1/4] iio: dummy: set scan_index for unbuffered channels Vlad Dogaru
2014-11-25 16:11 ` Daniel Baluta
2014-12-12 11:48 ` Jonathan Cameron
2014-11-25 12:48 ` [PATCH 2/4] iio: ensure scan index is unique at buffer register Vlad Dogaru
2014-12-06 20:19 ` Hartmut Knaack
2014-12-12 11:50 ` Jonathan Cameron
2014-11-25 12:48 ` [RFC PATCH 3/4] iio: add valid sample channel Vlad Dogaru
2014-11-25 12:48 ` [RFC PATCH 4/4] iio: illustrate the use of a " Vlad Dogaru
2014-11-25 16:36 ` [PATCH 0/4] Add " Lars-Peter Clausen
2014-11-25 16:55 ` Daniel Baluta
2014-11-25 17:00 ` Lars-Peter Clausen
2014-11-25 17:29 ` Jonathan Cameron
2014-11-25 18:27 ` Octavian Purdila
2014-11-25 18:53 ` Lars-Peter Clausen [this message]
2014-11-26 12:58 ` Daniel Baluta
2014-12-01 20:06 ` Lars-Peter Clausen
2014-12-01 20:46 ` Daniel Baluta
2014-12-01 20:51 ` Lars-Peter Clausen
2014-12-01 21:03 ` Daniel Baluta
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=5474D047.4040501@metafoo.de \
--to=lars@metafoo.de \
--cc=daniel.baluta@intel.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=octavian.purdila@intel.com \
--cc=vlad.dogaru@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).