From: Bastien Nocera <hadess@hadess.net>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Eric Piel <eric.piel@tremplin-utc.net>,
linux-input@vger.kernel.org, letux-kernel@openphoenux.org,
kernel@pyra-handheld.com, Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org
Subject: Re: [RFC v3] iio: input-bridge: optionally bridge iio acceleometers to create a /dev/input interface
Date: Fri, 10 May 2019 10:56:55 +0200 [thread overview]
Message-ID: <55468fdd88da9f487789b2073a1babb14bc7a282.camel@hadess.net> (raw)
In-Reply-To: <AA2B43FE-E196-4FEC-B4C5-897D0F44A76F@goldelico.com>
On Tue, 2019-04-16 at 21:33 +0200, H. Nikolaus Schaller wrote:
> Hi Bastien,
>
> > Am 16.04.2019 um 18:04 schrieb Bastien Nocera <hadess@hadess.net>:
> > This can be done in user-space, reading the data from the IIO driver,
> > and using uinput to feed it back. Why is doing this at the kernel level
> > better?
>
> Well, I'd estimate that >80% of the current kernel could be done in user-space
> (but not at the same speed/quality).
>
> E.g. TCP could most likely be done by directly accessing the Ethernet layer and
> providing other processes access through named pipes instead of sockets.
>
> But usually a user-space daemon feeding things back into the kernel is slower
> (because it is scheduled differently) and needs more resources for running the
> process and IPC and is less protected against hickups and deadlocks.
This is mostly irrelevant for the amount of data we're treating, but it
doesn't matter too much.
> Two more aspects come to my mind from reading your project page:
>
> a) "It requires libgudev and systemd"
> b) "Note that a number of kernel bugs will prevent it from working correctly"
>
> a) this makes quite significant assumptions about the user-space while a kernel
> driver can be kept independent of this
It's made for modern desktop OSes/"traditional" Linux. I don't think
that those 2 libraries are problematic dependencies unless you're on
Android, where a replacement could be implemented or iio-sensor-proxy
modified for that use case.
> b) if it is in-kernel it will be kept in sync with kernel changes and such bugs
> are less likely
No they're not. This warning was because 1) drivers sometimes have bugs
2) user-space sometimes has bugs 3) user-space sometimes causes the
kernel to have bugs.
The 2 significant breakages for iio-sensor-proxy were caused by runtime
PM bugs in the hid-sensor-hub driver, and in the USB core. I doubt a
kernel-space implementation would have been able to magically fix those
bugs unfortunately.
prev parent reply other threads:[~2019-05-10 8:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 21:05 [RFC v3] iio: input-bridge: optionally bridge iio acceleometers to create a /dev/input interface H. Nikolaus Schaller
2019-04-16 16:04 ` Bastien Nocera
2019-04-16 19:33 ` H. Nikolaus Schaller
2019-05-10 8:56 ` Bastien Nocera [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=55468fdd88da9f487789b2073a1babb14bc7a282.camel@hadess.net \
--to=hadess@hadess.net \
--cc=dmitry.torokhov@gmail.com \
--cc=eric.piel@tremplin-utc.net \
--cc=hns@goldelico.com \
--cc=jic23@kernel.org \
--cc=kernel@pyra-handheld.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=letux-kernel@openphoenux.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/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).