Input: evdev - only signal polls on full packets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux