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

Issue 628124 link

Starred by 3 users

Issue metadata

Status: Verified
Owner:
Closed: Oct 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

arc: Perform disk space check in session_manager

Project Member Reported by nya@chromium.org, Jul 14 2016

Issue description

Currently we perform disk space check before booting ARC in arc_bridge_bootstrap.cc:

  https://codereview.chromium.org/2136023002/
  crbug.com/625923

However it adds one more D-Bus method call, which actually costs ~100ms on minnie. To avoid this extra cost, we want to move the disk space check logic into session_manager side.

To make this happen, we also need to allow StartArcInstance() D-Bus method to return error codes according to failure reasons.
 

Comment 1 by nya@chromium.org, Jul 14 2016

Cc: yusukes@chromium.org
Owner: nya@chromium.org
Status: Assigned (was: Untriaged)
+yusukes

Yusuke, it turned out that an extra D-Bus method call added in the above patch increases ARC boot time by ~100ms. Since we want to resolve crbug.com/625923 in M53, could you please allow this regression? Instead, I will work on this issue (to get rid of the regression) next.

I wrote a tiny program that just calls statvfs() and it usually takes 10-16msec to run, so it appears that we have 84-90msec of overhead per D-Bus method call? That's a bit surprising.

Comment 3 by uekawa@chromium.org, Jul 15 2016

I think at boot time thread is starved and a DBUS call that does disk I/O would be slower than usual.

The tradeoff of a system not booting vs booting 100ms slower seems clear; I would take a system that boots 100ms slower than something that might not boot.


Re #3:
> The tradeoff of a system not booting vs booting 100ms slower seems clear

The tradeoff here is rather slowness vs. amount of code change (where we should implement this, current impl on Chromium, or another on session_manager with DBus change).

Anyway, I'd +1 for #1 now. WDYT, yusukes@?

I'm fine with the 100ms regression as long as this bug is marked as M-54 Pri-1 or 2 (so could you triage this properly?)

BTW, I'm wondering why we need the D-Bus call. Does Chromium's seccomp sandbox prevent us from calling statvfs in the browser process?


Comment 6 by nya@chromium.org, Jul 15 2016

Hmm, good point that Chrome may be able to call statvfs() directly. Let me try.

Comment 7 by nya@chromium.org, Jul 15 2016

Labels: -Pri-3 M-54 Pri-1
Labels: -M-54 M-55
Owner: hidehiko@chromium.org
Project Member

Comment 9 by bugdroid1@chromium.org, Oct 7 2016

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

commit de2073cc7c44480d70bd2c2ba9c0a0f87e24ed55
Author: Hidehiko Abe <hidehiko@chromium.org>
Date: Wed Oct 05 23:30:13 2016

login: Add free-disk-size check on StartArcInstance().

This CL is the session_manager side change for moving
free disk size check from Chrome.
The corresponding check is
https://cs.chromium.org/chromium/src/components/arc/arc_bridge_bootstrap.cc?q=arc_bridge_bootstrap.cc&sq=package:chromium&dr&l=313

BUG= chromium:628124 ,  chromium:633258 , b:30498714
TEST=Ran on test device. Ran unittests.

Change-Id: I4c1ca01101efdc30081afc94312399124fa8e358
Reviewed-on: https://chromium-review.googlesource.com/393628
Commit-Ready: Hidehiko Abe <hidehiko@chromium.org>
Tested-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>

[modify] https://crrev.com/de2073cc7c44480d70bd2c2ba9c0a0f87e24ed55/login_manager/dbus_error_types.cc
[modify] https://crrev.com/de2073cc7c44480d70bd2c2ba9c0a0f87e24ed55/login_manager/mock_system_utils.h
[modify] https://crrev.com/de2073cc7c44480d70bd2c2ba9c0a0f87e24ed55/login_manager/session_manager_impl.cc
[modify] https://crrev.com/de2073cc7c44480d70bd2c2ba9c0a0f87e24ed55/login_manager/session_manager_impl_unittest.cc
[modify] https://crrev.com/de2073cc7c44480d70bd2c2ba9c0a0f87e24ed55/login_manager/system_utils_impl.cc
[modify] https://crrev.com/de2073cc7c44480d70bd2c2ba9c0a0f87e24ed55/login_manager/system_utils_impl.h
[modify] https://crrev.com/de2073cc7c44480d70bd2c2ba9c0a0f87e24ed55/login_manager/dbus_error_types.h
[modify] https://crrev.com/de2073cc7c44480d70bd2c2ba9c0a0f87e24ed55/login_manager/system_utils.h

Project Member

Comment 10 by bugdroid1@chromium.org, Oct 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/14f70fe81402b55617e7f92839368b14c42eaf1f

commit 14f70fe81402b55617e7f92839368b14c42eaf1f
Author: hidehiko <hidehiko@chromium.org>
Date: Fri Oct 07 16:13:54 2016

Move free disk space check to session_manager.

Now session_manager returns an error if the free disk
space is low. Thus, this removes the current disk space
checking in arc_bridge_bootstrap, instead, looking at
the error code on StartArcInstance failure.

BUG= 628124 ,  633258 , b/30498714
TEST=Ran on test device. Ran trybots.

Review-Url: https://codereview.chromium.org/2397863003
Cr-Commit-Position: refs/heads/master@{#423873}

[modify] https://crrev.com/14f70fe81402b55617e7f92839368b14c42eaf1f/chrome/browser/chromeos/settings/device_settings_test_helper.cc
[modify] https://crrev.com/14f70fe81402b55617e7f92839368b14c42eaf1f/chrome/browser/chromeos/settings/device_settings_test_helper.h
[modify] https://crrev.com/14f70fe81402b55617e7f92839368b14c42eaf1f/chromeos/dbus/fake_session_manager_client.cc
[modify] https://crrev.com/14f70fe81402b55617e7f92839368b14c42eaf1f/chromeos/dbus/fake_session_manager_client.h
[modify] https://crrev.com/14f70fe81402b55617e7f92839368b14c42eaf1f/chromeos/dbus/mock_session_manager_client.h
[modify] https://crrev.com/14f70fe81402b55617e7f92839368b14c42eaf1f/chromeos/dbus/session_manager_client.cc
[modify] https://crrev.com/14f70fe81402b55617e7f92839368b14c42eaf1f/chromeos/dbus/session_manager_client.h
[modify] https://crrev.com/14f70fe81402b55617e7f92839368b14c42eaf1f/components/arc/arc_bridge_bootstrap.cc

Status: Fixed (was: Assigned)
Done.
Status: Verified (was: Fixed)

Sign in to add a comment