New issue
Advanced search Search tips

Issue 653720 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature



Sign in to add a comment

allow swap to be more directly controlled by crosh

Project Member Reported by vapier@chromium.org, Oct 6 2016

Issue description

you can tweak the runtime settings of swap via crosh currently, but they only take effect at the next boot, and you can't explicitly turn it on/off immediately.  let's improve this.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 12 2016

Project Member

Comment 2 by bugdroid1@chromium.org, Oct 12 2016

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/d96cf0843d5d610508cd197d95e0bb714bc0b951

commit d96cf0843d5d610508cd197d95e0bb714bc0b951
Author: Mike Frysinger <vapier@chromium.org>
Date: Thu Oct 06 23:07:20 2016

swap-init: add a proper main function

There's not a whole lot functionally different here.  We convert to a
main function like our shell style guide says to, so we stuff all the
existing content into a new start() function and indent it and that's
all.

BUG= chromium:653720 
TEST=restarting swap still works

Change-Id: I225677786019f10240b5290a21abe67349dbea7a
Reviewed-on: https://chromium-review.googlesource.com/395127
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Cheng-Yu Lee <cylee@chromium.org>

[rename] https://crrev.com/d96cf0843d5d610508cd197d95e0bb714bc0b951/chromeos-base/swap-init/swap-init-0.0.1-r7.ebuild
[modify] https://crrev.com/d96cf0843d5d610508cd197d95e0bb714bc0b951/chromeos-base/swap-init/files/init/swap.sh
[modify] https://crrev.com/d96cf0843d5d610508cd197d95e0bb714bc0b951/chromeos-base/swap-init/files/init/swap.service
[modify] https://crrev.com/d96cf0843d5d610508cd197d95e0bb714bc0b951/chromeos-base/swap-init/files/init/swap.conf

Project Member

Comment 4 by bugdroid1@chromium.org, Oct 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/da8b7ff30bc66d62d9cd73e8b3840d27d3a65622

commit da8b7ff30bc66d62d9cd73e8b3840d27d3a65622
Author: Mike Frysinger <vapier@chromium.org>
Date: Thu Oct 06 23:09:03 2016

swap-init: add a stop option

This will let other places (like debugd) call stop on us to tear down
the swap and zram logic that we set up in the start phase.

BUG= chromium:653720 
TEST=restarting swap still works

Change-Id: I74895ccfdb6218e645cd11bb684e072933b69dae
Reviewed-on: https://chromium-review.googlesource.com/395128
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Cheng-Yu Lee <cylee@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>

[modify] https://crrev.com/da8b7ff30bc66d62d9cd73e8b3840d27d3a65622/chromeos-base/swap-init/files/init/swap.sh
[rename] https://crrev.com/da8b7ff30bc66d62d9cd73e8b3840d27d3a65622/chromeos-base/swap-init/swap-init-0.0.1-r8.ebuild

Project Member

Comment 5 by bugdroid1@chromium.org, Oct 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/3ee1a627d038235464829401770d8cf01bf86b61

commit 3ee1a627d038235464829401770d8cf01bf86b61
Author: Mike Frysinger <vapier@chromium.org>
Date: Thu Oct 06 23:15:09 2016

swap-init: add more callbacks for debugd

Rather than have crosh hold all this logic, move it to the init script
so we have all the swap logic in a single place.

BUG= chromium:653720 
TEST=restarting swap still works

Change-Id: I7e8631d1c99cc8359a8c37c9f20852313684aaaf
Reviewed-on: https://chromium-review.googlesource.com/395129
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Cheng-Yu Lee <cylee@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>

[rename] https://crrev.com/3ee1a627d038235464829401770d8cf01bf86b61/chromeos-base/swap-init/swap-init-0.0.1-r9.ebuild
[modify] https://crrev.com/3ee1a627d038235464829401770d8cf01bf86b61/chromeos-base/swap-init/files/init/swap.sh

Project Member

Comment 6 by bugdroid1@chromium.org, Oct 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/079d67960b2b91ec60aa787e8ffd909c84bac1e4

commit 079d67960b2b91ec60aa787e8ffd909c84bac1e4
Author: Mike Frysinger <vapier@chromium.org>
Date: Thu Oct 06 23:10:49 2016

swap-init: clean up shell style a bit

We add missing quotes and braces mostly.

BUG= chromium:653720 
TEST=restarting swap still works

Change-Id: I7964bc22d21ed801fd609587d02dec263b5de094
Reviewed-on: https://chromium-review.googlesource.com/395130
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/079d67960b2b91ec60aa787e8ffd909c84bac1e4/chromeos-base/swap-init/files/init/swap.sh
[rename] https://crrev.com/079d67960b2b91ec60aa787e8ffd909c84bac1e4/chromeos-base/swap-init/swap-init-0.0.1-r10.ebuild

Project Member

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

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

commit 57538c0e8567d3492b05b25f12a23973b3512992
Author: Mike Frysinger <vapier@chromium.org>
Date: Fri Oct 07 03:01:33 2016

crosh/debugd: move swap logic to debugd to support more options

Now that the swap.sh script supports multiple options to control
its behavior, move the crosh logic to modify config files into
deubgd.  This allows us to access things from crosh that require
supervisor permission.  In the future, we can even move the file
to a more restricted location.

BUG= chromium:653720 
TEST=turning on/off swap works, as does changing the config
CQ-DEPEND=CL:395129

Change-Id: If4152b3c1f78bba2dec86fa481d8296ee142f2bd
Reviewed-on: https://chromium-review.googlesource.com/395133
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[add] https://crrev.com/57538c0e8567d3492b05b25f12a23973b3512992/debugd/src/swap_tool.cc
[modify] https://crrev.com/57538c0e8567d3492b05b25f12a23973b3512992/debugd/src/debug_daemon.cc
[add] https://crrev.com/57538c0e8567d3492b05b25f12a23973b3512992/debugd/src/swap_tool.h
[modify] https://crrev.com/57538c0e8567d3492b05b25f12a23973b3512992/debugd/dbus_bindings/org.chromium.debugd.xml
[modify] https://crrev.com/57538c0e8567d3492b05b25f12a23973b3512992/crosh/crosh
[modify] https://crrev.com/57538c0e8567d3492b05b25f12a23973b3512992/debugd/src/debug_daemon.h
[modify] https://crrev.com/57538c0e8567d3492b05b25f12a23973b3512992/debugd/debugd.gyp

Status: Fixed (was: Started)

Comment 9 by dchan@google.com, Mar 4 2017

Labels: VerifyIn-58

Comment 10 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 11 by dchan@google.com, May 30 2017

Labels: VerifyIn-60
Labels: VerifyIn-61

Comment 13 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)
Status: Fixed (was: Archived)

Sign in to add a comment