"swap set_extra_free default" not working properly
Reported by
wpwoo...@gmail.com,
Oct 13 2017
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; CrOS x86_64 9765.81.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.120 Safari/537.36 Platform: 9765.81.0 (Official Build) stable-channel caroline Steps to reproduce the problem: 1. In crosh, run swap status 2. Note extra_free_kbytes value is 358400 3. type swap set_extra_free default 4. Note extra_free_kbytes value is 0, not 358400 What is the expected behavior? "swap set_extra_free default" should set extra_free_kbytes to its default value What went wrong? It is set to zero Did this work before? No Chrome version: 61.0.3163.120 Channel: stable OS Version: 9765.81.0 Flash Version: I would like to be able to experiment with non-default values for extra_free_kbytes, then revert to the default value when Chrome OS is updated.
,
Oct 24 2017
,
Oct 24 2017
I had not planned to extend the "default" setting behavior of set_margin to the other parameters, but you are right that it should be consistent. Also the output of "help swap" contains this. The set_margin option changes the low-memory warning margin immediately and persistently to the chosen amount (in MiB). A value of 0, or the string "default", restore the default behavior. The current value is shown with "swap status". Similarly, the set_min_filelist and set_extra_free change obscure kernel parameters (which are similarly named) in the same way. "in the same way" suggests that it should also work with "default".
,
Oct 24 2017
#3 correction: it works with "default" for the wrong definition of "default"...
,
Oct 24 2017
You can work around this by rebooting. Of course this means you can't set those values to 0 persistently, which is also a problem.
,
Oct 24 2017
So to work around, you set extra_free_kbytes to 0, then reboot? I expected that "default" meant the value it would be after a power wash.
,
Oct 24 2017
#6 correct. I doubt that a power wash will touch these settings. The settings are per-device and stored in /var/lib/swap, which I doubt is cleared. But don't count on that behavior. These settings are exposed only for experiments. See the warning at the top of chrome://flags.
,
Oct 31 2017
Luigi, looking at the Samsung Chromebook Plus and Google Pixelbook at Best Buy, I see that they have extra_free_kbytes set to 0 - why are they different from the Pro? Assuming its not a configuration specific to floor models.
,
Oct 31 2017
#8: there are a number of differences between these devices (amount of RAM, graphics, CPU speed) and we tweak these parameters differently to optimize for each device. (How well we do this is a separate issue---but we're trying our best and we're working at improving it :)
,
Oct 31 2017
#9: Well, congratulations on the Pro, mine is working great from a memory perspective on Chrome 61. Very stable! A few glitches (minimizing windows doesn't always work and sometimes when I restore a window it moves from maximized to taking up half the screen) but otherwise humming along :)
,
Oct 31 2017
#10 thanks, good to hear! Those "glitches" look like bugs. Please file feedback reports when they happen! (Or, if you can reproduce, file feedback AND a bug.)
,
Nov 9 2017
#10: Bug reported here: https://bugs.chromium.org/p/chromium/issues/detail?id=783310
,
Nov 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/ccbcc415bdf2ca0c0c4e8fb0f9e12184966bbecf commit ccbcc415bdf2ca0c0c4e8fb0f9e12184966bbecf Author: Luigi Semenzato <semenzato@chromium.org> Date: Fri Nov 10 03:16:24 2017 swap-init/swap.sh: fix handling of default values Use special value -1 to request restoring factory defaults. Also consider board override values when restoring defaults. BUG= chromium:774341 TEST=manually tested CQ-DEPEND=CL:736493 Change-Id: Ic9ec96c4f438110a9ecca8f9df2d578ce2e0e7c3 Reviewed-on: https://chromium-review.googlesource.com/736492 Commit-Ready: Luigi Semenzato <semenzato@chromium.org> Tested-by: Luigi Semenzato <semenzato@chromium.org> Reviewed-by: Luigi Semenzato <semenzato@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/ccbcc415bdf2ca0c0c4e8fb0f9e12184966bbecf/chromeos-base/swap-init/files/init/swap.sh [rename] https://crrev.com/ccbcc415bdf2ca0c0c4e8fb0f9e12184966bbecf/chromeos-base/swap-init/swap-init-0.0.1-r20.ebuild
,
Nov 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/3421c41c0f0f5c5a996225cacb2a2aca022e9dae commit 3421c41c0f0f5c5a996225cacb2a2aca022e9dae Author: Luigi Semenzato <semenzato@chromium.org> Date: Fri Nov 10 03:16:24 2017 crosh, debugd: fix handling of default values Some swap parameter setting commands used "0" to request a "default value". This was wrong in itself, because it precluded setting the parameters to 0. In addition, it didn't immediately restore the values to their factory defaults as promised, but only after a reboot. The "help" message also deserved some cleanup. BUG= chromium:774341 TEST=ran on device CQ-DEPEND=CL:736492 Change-Id: I457d570613af374265efe0a8b55a4fb71134b235 Reviewed-on: https://chromium-review.googlesource.com/736493 Commit-Ready: Luigi Semenzato <semenzato@chromium.org> Tested-by: Luigi Semenzato <semenzato@chromium.org> Reviewed-by: Luigi Semenzato <semenzato@chromium.org> [modify] https://crrev.com/3421c41c0f0f5c5a996225cacb2a2aca022e9dae/debugd/src/swap_tool.cc [modify] https://crrev.com/3421c41c0f0f5c5a996225cacb2a2aca022e9dae/debugd/src/debugd_dbus_adaptor.cc [modify] https://crrev.com/3421c41c0f0f5c5a996225cacb2a2aca022e9dae/debugd/src/debugd_dbus_adaptor.h [modify] https://crrev.com/3421c41c0f0f5c5a996225cacb2a2aca022e9dae/debugd/src/swap_tool.h [modify] https://crrev.com/3421c41c0f0f5c5a996225cacb2a2aca022e9dae/debugd/dbus_bindings/org.chromium.debugd.xml [modify] https://crrev.com/3421c41c0f0f5c5a996225cacb2a2aca022e9dae/crosh/crosh
,
Nov 10 2017
Or so I hope.
,
Nov 10 2017
#15 Great news, thanks! I'm on stable so may not see it for awhile.
,
Nov 10 2017
You're welcome. Don't go wild with it, OK?
,
Nov 15 2017
Luigi, I'm on Chrome 62 now. Rebooted, and ran: swap set_min_filelist default Rebooted, and min_filelist_kbytes is 400000 (as I expected). Signed off and back on, and now min_filelist_kbytes is 100000. This seems like a regression in Chrome 62 on Caroline.
,
Nov 15 2017
Did you do anything else between the reboot and the sign-off? Because we switch min_filelist_kbytes between those two values depending on whether Android apps are running or not.
,
Nov 15 2017
#19 I didn't do anything except allow my browser session to load. This is consistently reproducible and did not happen in previous Chrome OS versions.
,
Nov 15 2017
,
Nov 15 2017
Would you mind filing another feedback after this happens? It's possible that we start with 4OOMB at boot, then switch to 100MB some time later. I can check the timing. In any case, signing off and back on, even as a different user, should have no impact on these values. Also, if you aren't running android apps, 100MB is the correct number. It's possible that the previous behavior was the wrong one. Unless you think there is something wrong with this behavior (other than being different), I would be inclined to do nothing. Thanks!
,
Nov 16 2017
#22 feedback just filed. I am running Android. In earlier versions of Chrome OS, I would only see the 100000 value in the guest account which does not have Android. Now, when I reboot, it is 400000 in my account, but when I sign out then back in, it is 100000.
,
Nov 16 2017
Report 84659593441. Thanks.
,
Dec 4 2017
This doesn't just happen with setting the default value. When I run swap set_min_filelist <some-value> where <some-value> is not 100000 then log out and back in, it gets set to 100000.
,
Dec 4 2017
#25 thank you. The crosh/swap fixes didn't make it into R63, compare these logs: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+log/release-R63-10032.B/chromeos-base/swap-init/files/init/swap.sh https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+log/release-R64-10176.B/chromeos-base/swap-init/files/init/swap.sh Since these changes are for experimental use only, I didn't bother backporting them to the release branch. We're taking another look to make sure that the default behavior is correct.
,
Dec 4 2017
Opened issue 791605 for missing start-arc-instance signal. #25 thanks again.
,
Jan 5 2018
Luigi, I think you might be interested in this one I reported: https://bugs.chromium.org/p/chromium/issues/detail?id=799501
,
Jan 22 2018
,
Jan 23 2018
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by tbuck...@chromium.org
, Oct 13 2017