CHROMIUM: low_mem: make ram_vs_swap_weight configurable
As a temporary fix to OOM kill deadlocks, we want to try to
avoid OOMs or at least reduce the number of occurrences.
So we make the ram_vs_weight parameter run-time configurable,
with two possible uses in mind: 1. leave as is (the default)
and 2. on specific devices, set it to infinity so that
available swap is completely ignored in the available memory
calculation.
This also adds the "available" sysfs entry, so that chrome
doesn't have to duplicate the available memory calculations.
BUG=chromium:727707
TEST=played around with sysfs
Change-Id: I9f9391c07227200299f6bb570687dc883feca6cb
Reviewed-on: https://chromium-review.googlesource.com/522411
Commit-Ready: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
(cherry picked from commit 83a933a97b7492a044a579146a8a6ddb054623c2)
Reviewed-on: https://chromium-review.googlesource.com/541970
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
(cherry picked from commit 77b34c30a6dbec238553163976ea7fb201ca64aa)
Reviewed-on: https://chromium-review.googlesource.com/544703
Reviewed-by: Ben Cheng <bccheng@chromium.org>
Commit-Queue: Ben Cheng <bccheng@chromium.org>
Tested-by: Ben Cheng <bccheng@chromium.org>
Trybot-Ready: Ben Cheng <bccheng@chromium.org>
2 files changed