From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Bill Gatliff <bgat@billgatliff.com>, linux-input@vger.kernel.org
Subject: Re: Synchronizing evdev readers and drivers?
Date: Fri, 3 Dec 2010 15:05:52 -0800 [thread overview]
Message-ID: <20101203230552.GA22969@core.coreip.homeip.net> (raw)
In-Reply-To: <20101203222744.GA15995@opensource.wolfsonmicro.com>
On Fri, Dec 03, 2010 at 10:27:45PM +0000, Mark Brown wrote:
> On Fri, Dec 03, 2010 at 01:41:37PM -0600, Bill Gatliff wrote:
> > On Fri, Dec 3, 2010 at 12:52 PM, Mark Brown
>
> I'm only going to reply to a couple of specific things that weren't
> covered in what Dimitry said here:
>
> > It isn't a hypothetical situation: as far as I can tell right now,
> > most Android ports are already pacing their input device sampling in
> > userspace already. That in itself doesn't justify implementing the
> > read callback, but it does suggest that there are situations (ok, at
> > least one) where users can truly benefit from that control.
>
> When looking at Android phones it's important to remember how these
> things are typically made: Android devices are put together by teams
> that frequently have little prior Linux experience, and are often
> produced under great time pressure. They're a great source of data
> about problems people are experiencing but you do have to really look
> to make sure you're addressing the root problem.
>
> For example, in this case I would imagine that the thought process of
> people implementing the code you're looking at is something like "The
> data is coming in too quickly. How can I slow it down? Oh, I can't.
> Well, I'll just slow down my reading and worry about it later if that
> turns out to be a problem.". It's most likely to be the lack of any
> current way to manage the data flow that is the underlying problem here,
> the implementations are just a convenient way for applications to bodge
> around the problem with the limited tools available to them.
Another possibility for an app design like this could have nothing to do
with hardware rate limiting:
We have N inputs that we want to get events from but the latency is not
that important. We do not want to lose events but we can afford to
postpone their processing. We know that on average, we are getting data
from input every X. Therefore, instead of being woken up as soon as we
get an event on any of the inputs, potentially several times per X
interval, schedule nonblocking reads every X and process all accumulated
events from all inputs at once.
--
Dmitry
next prev parent reply other threads:[~2010-12-03 23:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-02 17:26 Synchronizing evdev readers and drivers? Bill Gatliff
2010-12-02 21:22 ` Dmitry Torokhov
2010-12-02 21:34 ` Bill Gatliff
2010-12-03 12:42 ` Mark Brown
2010-12-03 13:03 ` Bill Gatliff
2010-12-03 13:53 ` Mark Brown
2010-12-03 17:36 ` Bill Gatliff
2010-12-03 18:52 ` Mark Brown
2010-12-03 19:41 ` Bill Gatliff
2010-12-03 22:27 ` Mark Brown
2010-12-03 23:05 ` Dmitry Torokhov [this message]
2010-12-03 19:50 ` Dmitry Torokhov
2010-12-03 20:17 ` Bill Gatliff
2010-12-03 21:24 ` Dmitry Torokhov
2010-12-03 19:32 ` Dmitry Torokhov
2010-12-03 19:50 ` Bill Gatliff
2010-12-03 20:56 ` Dmitry Torokhov
2010-12-04 17:52 ` Jonathan Cameron
2010-12-04 18:15 ` Bill Gatliff
2010-12-04 17:46 ` 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=20101203230552.GA22969@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=bgat@billgatliff.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-input@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 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).