Re: [PATCH] Input: evdev - per-client waitgroups

From: kl
Date: Tue Oct 06 2020 - 05:23:07 EST


October 6, 2020 1:35 AM, dmitry.torokhov@xxxxxxxxx wrote:

> On Wed, Apr 29, 2020 at 08:41:26PM +0200, Kenny Levinsen wrote:
>
>> All evdev clients share a common waitgroup. On new input events, this
>> waitgroup is woken once for every client that did not filter the events,
>
> I am having trouble parsing the changelog (I think I agree with the
> change itself). Did you mean to say "this waitqueue wakes up every
> client, even ones that requested to filter out events that are being
> delivered, leading to duplicated and unwanted wakeups"?

Ah, I suppose my original wording was a bit convoluted. Perhaps the following
is clearer:

All evdev clients share a common waitgroup. On new input events, all
clients waiting on this waitgroup are woken up, even those filtering
out the events, possibly more than once per event. This leads to
duplicated and unwanted wakeups.

What I tried to say is that not only do all clients polling the device/blocked
on read end up woken up, instead of being woken just once, they are woken once
for every client that was interested in the event.

So, if you have two clients interested and one uninterested, then the shared
waitgroup that all three clients are waiting on is woken up twice in a row.

Should I send an updated patch with the new wording? I'm also fine with your
suggested wording if you prefer that.

Best regards,
Kenny Levinsen