frecon wastes CPU cycles responding to pointer device input events it just ignores |
|||
Issue descriptionChrome OS Version: Chrome OS Platform: all Steps To Reproduce: (1) sign in as guest (2) close all windows (3) on terminal/ssh: top -d1 (4) move finger in circles on trackpad Expected Result: frecon CPU% is << 1% Actual Result: (example on grunt) PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 253 root 20 0 18960 4936 2388 S 3.0 0.1 0:00.49 frecon How frequently does this problem reproduce? (Always, sometimes, hard to reproduce?) Always when using pointer-moving input devices.
,
Aug 3
https://chromium-review.googlesource.com/c/chromiumos/platform/frecon/+/1162925 frecon: Do not listen to pointer devices
,
Aug 3
Note: This CPU usage is only when vts are enabled - that is in dev mode, recovery images, etc.
,
Aug 5
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/frecon/+/f0e61aa07472b1627bff3ff7781c642886fd7284 commit f0e61aa07472b1627bff3ff7781c642886fd7284 Author: Daniel Kurtz <djkurtz@chromium.org> Date: Sun Aug 05 06:46:38 2018 frecon: Do not listen to pointer devices Currently frecon's main loop process all events from all input devices. However, frecon only ever really cares about keyboard events and events from the lid switch. Since touchpads can generate events at ~100 Hz, this means frecon can spend a lot of time and CPU cycles waking up and running its main loop just to ignore the event. Fix this by just ignoring udev-discovered input devices that identify themselves as common pointer control devices. Note: This only matters when vts are enabled - that is when a regular image is in dev mode or in a recovery image, etc. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> BUG= chromium:870921 TEST=top -c -d1 <move finger on trackpad / touchscreen / or move mouse> => top shows frecon CPU % stays at << 1% Change-Id: Iee2bea44077df4a58ac1464f1e4cc6aaac80e6ba Reviewed-on: https://chromium-review.googlesource.com/1162925 Commit-Ready: Daniel Kurtz <djkurtz@chromium.org> Tested-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/f0e61aa07472b1627bff3ff7781c642886fd7284/dev.c
,
Aug 6
|
|||
►
Sign in to add a comment |
|||
Comment 1 by djkurtz@chromium.org
, Aug 3