From 57fdb5cfd2b20f47299a12c2050ff8bb2707c788 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Thu, 25 Jul 2013 10:34:30 -0700 Subject: [PATCH] add property to adjust extra_free_kbytes kernel vm tunable ActivityManager can't directly write to extra_free_kbytes because /proc/sys rejects all chown and chmod syscalls. Proxy the writes through init by using the sys.sysctl.extra_free_kbytes property. Bug: 10024467 Change-Id: I441e00478421254355fcafb252bc878166483d4c --- rootdir/init.rc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rootdir/init.rc b/rootdir/init.rc index 399028732..c7e96903e 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -402,6 +402,10 @@ on property:vold.decrypt=trigger_shutdown_framework on property:sys.powerctl=* powerctl ${sys.powerctl} +# system server cannot write to /proc/sys files, so proxy it through init +on property:sys.sysctl.extra_free_kbytes=* + write /proc/sys/vm/extra_free_kbytes ${sys.sysctl.extra_free_kbytes} + ## Daemon processes to be run by init. ## service ueventd /sbin/ueventd