Loading libcutils/sched_policy.c +7 −4 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ static int ta_cpuset_fd = -1; // special cpuset for top app // File descriptors open to /dev/stune/../tasks, setup by initialize, or -1 on error static int bg_schedboost_fd = -1; static int fg_schedboost_fd = -1; static int ta_schedboost_fd = -1; /* Add tid to the scheduling group defined by the policy */ static int add_tid_to_cgroup(int tid, int fd) Loading Loading @@ -140,6 +141,8 @@ static void __initialize(void) { ta_cpuset_fd = open(filename, O_WRONLY | O_CLOEXEC); #ifdef USE_SCHEDBOOST filename = "/dev/stune/top-app/tasks"; 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"; Loading Loading @@ -296,11 +299,11 @@ int set_cpuset_policy(int tid, SchedPolicy policy) case SP_AUDIO_APP: case SP_AUDIO_SYS: fd = fg_cpuset_fd; boost_fd = bg_schedboost_fd; boost_fd = fg_schedboost_fd; break; case SP_TOP_APP : fd = ta_cpuset_fd; boost_fd = fg_schedboost_fd; boost_fd = ta_schedboost_fd; break; case SP_SYSTEM: fd = system_bg_cpuset_fd; Loading Loading @@ -388,11 +391,11 @@ int set_sched_policy(int tid, SchedPolicy policy) case SP_AUDIO_APP: case SP_AUDIO_SYS: fd = fg_cgroup_fd; boost_fd = bg_schedboost_fd; boost_fd = fg_schedboost_fd; break; case SP_TOP_APP: fd = fg_cgroup_fd; boost_fd = fg_schedboost_fd; boost_fd = ta_schedboost_fd; break; default: fd = -1; Loading rootdir/init.rc +4 −0 Original line number Diff line number Diff line Loading @@ -50,12 +50,16 @@ on init mkdir /dev/stune mount cgroup none /dev/stune schedtune mkdir /dev/stune/foreground mkdir /dev/stune/top-app chown system system /dev/stune chown system system /dev/stune/foreground 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/top-app/tasks chmod 0664 /dev/stune/tasks chmod 0664 /dev/stune/foreground/tasks chmod 0664 /dev/stune/top-app/tasks # Mount staging areas for devices managed by vold # See storage config details at http://source.android.com/tech/storage/ Loading Loading
libcutils/sched_policy.c +7 −4 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ static int ta_cpuset_fd = -1; // special cpuset for top app // File descriptors open to /dev/stune/../tasks, setup by initialize, or -1 on error static int bg_schedboost_fd = -1; static int fg_schedboost_fd = -1; static int ta_schedboost_fd = -1; /* Add tid to the scheduling group defined by the policy */ static int add_tid_to_cgroup(int tid, int fd) Loading Loading @@ -140,6 +141,8 @@ static void __initialize(void) { ta_cpuset_fd = open(filename, O_WRONLY | O_CLOEXEC); #ifdef USE_SCHEDBOOST filename = "/dev/stune/top-app/tasks"; 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"; Loading Loading @@ -296,11 +299,11 @@ int set_cpuset_policy(int tid, SchedPolicy policy) case SP_AUDIO_APP: case SP_AUDIO_SYS: fd = fg_cpuset_fd; boost_fd = bg_schedboost_fd; boost_fd = fg_schedboost_fd; break; case SP_TOP_APP : fd = ta_cpuset_fd; boost_fd = fg_schedboost_fd; boost_fd = ta_schedboost_fd; break; case SP_SYSTEM: fd = system_bg_cpuset_fd; Loading Loading @@ -388,11 +391,11 @@ int set_sched_policy(int tid, SchedPolicy policy) case SP_AUDIO_APP: case SP_AUDIO_SYS: fd = fg_cgroup_fd; boost_fd = bg_schedboost_fd; boost_fd = fg_schedboost_fd; break; case SP_TOP_APP: fd = fg_cgroup_fd; boost_fd = fg_schedboost_fd; boost_fd = ta_schedboost_fd; break; default: fd = -1; Loading
rootdir/init.rc +4 −0 Original line number Diff line number Diff line Loading @@ -50,12 +50,16 @@ on init mkdir /dev/stune mount cgroup none /dev/stune schedtune mkdir /dev/stune/foreground mkdir /dev/stune/top-app chown system system /dev/stune chown system system /dev/stune/foreground 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/top-app/tasks chmod 0664 /dev/stune/tasks chmod 0664 /dev/stune/foreground/tasks chmod 0664 /dev/stune/top-app/tasks # Mount staging areas for devices managed by vold # See storage config details at http://source.android.com/tech/storage/ Loading