aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib/upgrade/stage2
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2020-11-24 08:39:48 +0200
committerPetr Štetiar <ynezz@true.cz>2020-12-22 18:59:10 +0100
commit3d12b47985fc1983849925d2dc23430f55210c80 (patch)
tree9b2e833445b3e6470a2e151c5402fb45b33d4c3a /package/base-files/files/lib/upgrade/stage2
parent3064651bf75d3ca08cbfff916a14e8b3c4c246fb (diff)
downloadupstream-3d12b47985fc1983849925d2dc23430f55210c80.tar.gz
upstream-3d12b47985fc1983849925d2dc23430f55210c80.tar.bz2
upstream-3d12b47985fc1983849925d2dc23430f55210c80.zip
base-files: flush kernel memory cache during sysupgrade
Flush kernel memory caches during sysupgrade in order to mitigate the impact from memory consumption spikes in low-RAM devices. This may help to prevent sysupgrade causing a reboot before the actual flashing starts. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Diffstat (limited to 'package/base-files/files/lib/upgrade/stage2')
-rwxr-xr-xpackage/base-files/files/lib/upgrade/stage21
1 files changed, 1 insertions, 0 deletions
diff --git a/package/base-files/files/lib/upgrade/stage2 b/package/base-files/files/lib/upgrade/stage2
index c7629c383f..23d356a447 100755
--- a/package/base-files/files/lib/upgrade/stage2
+++ b/package/base-files/files/lib/upgrade/stage2
@@ -123,6 +123,7 @@ kill_remaining KILL 1
sleep 1
+echo 3 > /proc/sys/vm/drop_caches
if [ -n "$IMAGE" ] && type 'platform_pre_upgrade' >/dev/null 2>/dev/null; then
platform_pre_upgrade "$IMAGE"