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

Issue 652039 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Mar 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 650897



Sign in to add a comment

accelerometer-init should be done after stateful is mounted

Project Member Reported by smbar...@chromium.org, Oct 1 2016

Issue description

dump_vpd_log has a cache on the stateful partition of the contents of VPD, but accelerometer-init can be called so early that chromeos_startup hasn't yet mounted stateful. In the case with two accelerometers to initialize, we do two simultaneous calls to dump_vpd_log, which yields two calls to flashrom. One flashrom call will be blocked while the other is running (see attached timechart).

If we can move this to after stateful is mounted, then at least the two dump_vpd_log instances can finish without blocking each other. In my experiments I've seen a 150ms improvement by doing this.
 
accel-init.png
20.9 KB View Download
Cc: jrbarnette@chromium.org
accel udev rule that call dump_vpd_log is triggered by udev-trigger-early triggered when udevd is running, and udevd is starting alongside chromeos_startup.

We need to add another udev-trigger-early type script, udev-trigger-stateful, that generates the accelerator udev events only after stateful is mounted, but before the general udev-trigger script.

it would start on started boot-services, bu the ui.conf should now depend on it.

Comment 2 by vapier@chromium.org, Feb 27 2017

as discussed over chat, the accel logic is not needed in udev-trigger-early if it's only needed by Chrome.  the other graphics targets are in the early phase because they are needed by the bootsplash/frecon code to actually display graphics.

so you'll want to create a new init rule to trigger just the accel devices and move it to the standard "start on starting ui".  that'll cause it to block Chrome itself.

Comment 3 by vapier@chromium.org, Feb 27 2017

Cc: vapier@chromium.org
Project Member

Comment 4 by bugdroid1@chromium.org, Mar 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/ec7cbdfd37dcb5438bc0eaafe4d070483fae3214

commit ec7cbdfd37dcb5438bc0eaafe4d070483fae3214
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Thu Mar 02 02:42:16 2017

init: Move cros-ec accelerometers setup to its own .conf

Move the .conf file for setting accelerometers in chromeos-accelerometer-init
package.
Accelerometers set up script needs chromeos-startup to complete, now
start the setup when ui is being started.

BUG= chromium:650897 , chromium:652039 
CQ-DEPEND=CL:447882
TEST=Done in CL:447882

Change-Id: Ied77752ae7039507be5ee3ea21e658364d13c8d5
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/448158
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/ec7cbdfd37dcb5438bc0eaafe4d070483fae3214/init/udev-trigger-early.conf

Project Member

Comment 5 by bugdroid1@chromium.org, Mar 3 2017

Labels: merge-merged-release-R57-9202.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/1f9435ed6a50d7b9b25b1dd6cfcabe3584af3f4b

commit 1f9435ed6a50d7b9b25b1dd6cfcabe3584af3f4b
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Fri Mar 03 17:26:04 2017

init: Move cros-ec accelerometers setup to its own .conf

Move the .conf file for setting accelerometers in chromeos-accelerometer-init
package.
Accelerometers set up script needs chromeos-startup to complete, now
start the setup when ui is being started.

BUG= chromium:650897 , chromium:652039 
CQ-DEPEND=CL:447882
TEST=Done in CL:447882

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/448158
Reviewed-by: Mike Frysinger <vapier@chromium.org>
(cherry picked from commit ec7cbdfd37dcb5438bc0eaafe4d070483fae3214)
Change-Id: Ied77752ae7039507be5ee3ea21e658364d13c8d5
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/448250

[modify] https://crrev.com/1f9435ed6a50d7b9b25b1dd6cfcabe3584af3f4b/init/udev-trigger-early.conf

Status: Fixed (was: Untriaged)

Sign in to add a comment