From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Cc: linux-input <linux-input@vger.kernel.org>
Subject: Re: Is delayed work's precision good enough for input-poller?
Date: Thu, 12 Nov 2020 17:46:51 -0800 [thread overview]
Message-ID: <20201113014651.GB356503@dtor-ws> (raw)
In-Reply-To: <e1d48a94a9f080534d4940048081d5ecdc64d4e9.camel@suse.de>
Hi Nicolas,
On Thu, Nov 12, 2020 at 04:30:49PM +0100, Nicolas Saenz Julienne wrote:
> Hi everyone,
> I just found about an issue in the downstream Raspberry Pi[1] kernel that I
> wonder if it'd be worth fixing generally. The official RPi DSI display
> touchscreen uses the polled input interface. The ts chip works at around 60Hz,
> and that's the period the driver is configured to use (17ms). This doesn't play
> too good on systems with low HZ (100/250). Users complain that in practice they
> experience, at worst, half the event rate. This is due to the rounding error
> when converting milliseconds to jiffies, general system delays, and what not.
>
> We could somewhat fix this in the driver (raspberrypi-ts.c) by playing with the
> poll rate. But it seems pretty hacky and would ultimately stress the CPU
> unnecessarily. I wonder to what extent it makes sense to move the
> implementation to using hrtimers whenever the poll period is in the same order
> of magnitude as HZ's delta.
>
> Any ideas/comments?
The polling function in the poller is supposed to be able to sleep, so
you will still have to schedule work which will introduce additional
delay.
If that works for you then I'd be OK with switching to hrtimers for
small poll intervals.
Thanks.
--
Dmitry
prev parent reply other threads:[~2020-11-13 1:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 15:30 Is delayed work's precision good enough for input-poller? Nicolas Saenz Julienne
2020-11-13 1:46 ` Dmitry Torokhov [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=20201113014651.GB356503@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=nsaenzjulienne@suse.de \
/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).