Add support for background stune group.
bug 29512132
Change-Id: If8144bfee0fb30cf11f2bb26494ca5e83c11d4d7
diff --git a/libcutils/sched_policy.c b/libcutils/sched_policy.c
index c097a12..05a2048 100644
--- a/libcutils/sched_policy.c
+++ b/libcutils/sched_policy.c
@@ -145,7 +145,7 @@
ta_schedboost_fd = open(filename, O_WRONLY | O_CLOEXEC);
filename = "/dev/stune/foreground/tasks";
fg_schedboost_fd = open(filename, O_WRONLY | O_CLOEXEC);
- filename = "/dev/stune/tasks";
+ filename = "/dev/stune/background/tasks";
bg_schedboost_fd = open(filename, O_WRONLY | O_CLOEXEC);
#endif
}
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 32970e4..97bfe6b 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -50,15 +50,19 @@
mkdir /dev/stune
mount cgroup none /dev/stune schedtune
mkdir /dev/stune/foreground
+ mkdir /dev/stune/background
mkdir /dev/stune/top-app
chown system system /dev/stune
chown system system /dev/stune/foreground
+ chown system system /dev/stune/background
chown system system /dev/stune/top-app
chown system system /dev/stune/tasks
chown system system /dev/stune/foreground/tasks
+ chown system system /dev/stune/background/tasks
chown system system /dev/stune/top-app/tasks
chmod 0664 /dev/stune/tasks
chmod 0664 /dev/stune/foreground/tasks
+ chmod 0664 /dev/stune/background/tasks
chmod 0664 /dev/stune/top-app/tasks
# Mount staging areas for devices managed by vold