linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Hutterer <peter.hutterer@who-t.net>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: David Herrmann <dh.herrmann@gmail.com>,
	"open list:HID CORE LAYER" <linux-input@vger.kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@gmail.com>
Subject: Re: [PATCH] evdev: flush ABS_* events during EVIOCGABS
Date: Wed, 23 Apr 2014 17:09:02 +1000	[thread overview]
Message-ID: <20140423070902.GA18956@yabbi.redhat.com> (raw)
In-Reply-To: <20140423060747.GE24854@core.coreip.homeip.net>

On Tue, Apr 22, 2014 at 11:07:47PM -0700, Dmitry Torokhov wrote:
> On Wed, Apr 23, 2014 at 03:55:28PM +1000, Peter Hutterer wrote:
> > On Tue, Apr 22, 2014 at 10:46:47PM -0700, Dmitry Torokhov wrote:
> > > On Wed, Apr 23, 2014 at 03:38:49PM +1000, Peter Hutterer wrote:
> > > > On Wed, Apr 23, 2014 at 10:21:03AM +1000, Peter Hutterer wrote:
> > > > > On Tue, Apr 22, 2014 at 08:21:54AM +0200, David Herrmann wrote:

..

> > > > 
> > > > any comments?
> > > 
> > > Do we really need to optimize the case when we are dropping events?
> > 
> > It happens frequently, to the point where on some laptops you're pretty much
> > guaranteed to get SYN_DROPPED events on resume and sometimes even during
> > normal multi-finger user.
> > 
> > I don't have any measurements on how many events are dropped on average.
> > Could be one or two, could be several buffer sizes, I honestly don't know.
> 
> I think we need to figure this out. The idea is that dropping events
> should be an exception, not a rule.

increase the buffer size for the devices I guess, with some heuristics
maybe. you could dynamically grow the buffer in the kernel, if the buffer
gets full or close to full, grow it.

but really, this is a moving target, eventually you will get the
SYN_DROPPED. if a client sleeps for a second or more, the events from a
second ago are likely useless anyway, so the need for an atomic sync exists
regardless. fwiw, I can live with a atomic sync that clears the client
buffer provided I get the correct state. any optimisation on top of that can
be done afterwards.

Cheers,
   Peter

      reply	other threads:[~2014-04-23  7:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-10 19:09 [PATCH] evdev: flush ABS_* events during EVIOCGABS David Herrmann
2014-04-22  4:15 ` Peter Hutterer
2014-04-22  6:21   ` David Herrmann
2014-04-23  0:21     ` Peter Hutterer
2014-04-23  5:38       ` Peter Hutterer
2014-04-23  5:46         ` Dmitry Torokhov
2014-04-23  5:55           ` Peter Hutterer
2014-04-23  6:07             ` Dmitry Torokhov
2014-04-23  7:09               ` Peter Hutterer [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=20140423070902.GA18956@yabbi.redhat.com \
    --to=peter.hutterer@who-t.net \
    --cc=benjamin.tissoires@gmail.com \
    --cc=dh.herrmann@gmail.com \
    --cc=dmitry.torokhov@gmail.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).