evdev: reduce the "your system is slow" warning to 5 per hour
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 22 Oct 2020 04:59:03 +0000 (14:59 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 29 Oct 2020 02:32:04 +0000 (12:32 +1000)
Two cases where this can happen: system is currently slow and delaying events,
n which case we'll get a burst and it'll show up in the log files anyway. Or
the system is generally slow and we get these warnings all the time. In the
latter case, let's not spam the log.

Fixes #533

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 5faa3b7ae92abb7860b05e85dcdd402e2050ed72)

src/evdev.c

index 453c89a00f230953b59e65bc6083803032995649..40f0726b469fe20ceb83f5204361740cf7c517a8 100644 (file)
@@ -2225,8 +2225,8 @@ evdev_device_create(struct libinput_seat *seat,
 
        /* at most 5 SYN_DROPPED log-messages per 30s */
        ratelimit_init(&device->syn_drop_limit, s2us(30), 5);
-       /* at most 5 "delayed processing" log messages per minute */
-       ratelimit_init(&device->delay_warning_limit, s2us(60), 5);
+       /* at most 5 "delayed processing" log messages per hour */
+       ratelimit_init(&device->delay_warning_limit, s2us(60 * 60), 5);
        /* at most 5 log-messages per 5s */
        ratelimit_init(&device->nonpointer_rel_limit, s2us(5), 5);