Thread (2 messages) 2 messages, 2 authors, 2011-05-26

Input: evdev - only signal polls on full packets

From: Jeffrey Brown <hidden>
Date: 2011-05-26 07:38:03

Hi Dmitry,
I was just reviewing the final patch for the EV_SYN wake-up
optimization.  I'm glad to see it made it in.  It'll let me strip out
some unsightly hacks elsewhere.  :)

Anyways, my original patch contained this proposed change to
evdev_event, which seems to have been accidentally omitted:

-       wake_up_interruptible(&evdev->wait);
+       if (full_sync)
+               wake_up_interruptible(&evdev->wait);
 }

The idea was that we should only wake waiters on the event device when
we actually post an EV_SYN / SYN_REPORT to the queue.  Otherwise we
end up making waiting threads runnable again only for them to go right
back to sleep because the device still isn't readable.

So I think we want something like this in evdev_event:

if (type == EV_SYN && code == SYN_REPORT)
   wake_up_interruptible(&evdev->wait);

What do you think?

Context: http://git.kernel.org/?p=linux/kernel/git/dtor/input.git;a=blobdiff;f=drivers/input/evdev.c;h=75c4e86830331dbedd933a07b13cc723135df517;hp=88d8e4cb419a1d0d6cc17828894dc4d3b67e0201;hb=cdda911c34006f1089f3c87b1a1f31ab3a4722f2;hpb=03351ff4d897098a590cb247b6eebc470b8ecb5a

Thanks!
Jeff.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help