New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 870921 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Aug 6
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

frecon wastes CPU cycles responding to pointer device input events it just ignores

Project Member Reported by djkurtz@chromium.org, Aug 3

Issue description

Chrome 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.
 
OS version: R70-10931.0.0
Cc: martinroth@chromium.org
https://chromium-review.googlesource.com/c/chromiumos/platform/frecon/+/1162925 frecon: Do not listen to pointer devices
Note: This CPU usage is only when vts are enabled - that is in dev mode, recovery images, etc.
Project Member

Comment 4 by bugdroid1@chromium.org, 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

Status: Verified (was: Started)

Sign in to add a comment