diff options
-rw-r--r-- | libcutils/sched_policy.cpp | 2 | ||||
-rw-r--r-- | rootdir/init.rc | 9 |
2 files changed, 1 insertions, 10 deletions
diff --git a/libcutils/sched_policy.cpp b/libcutils/sched_policy.cpp index 7e3ad593e..40144cf16 100644 --- a/libcutils/sched_policy.cpp +++ b/libcutils/sched_policy.cpp @@ -464,7 +464,7 @@ int set_sched_policy(int tid, SchedPolicy policy) break; } - if (add_tid_to_cgroup(tid, fd) != 0) { + if (fd > 0 && add_tid_to_cgroup(tid, fd) != 0) { if (errno != ESRCH && errno != ENOENT) return -errno; } diff --git a/rootdir/init.rc b/rootdir/init.rc index 25cea7fc8..dcb3b2560 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -150,15 +150,6 @@ on init write /dev/cpuctl/cpu.rt_period_us 1000000 write /dev/cpuctl/cpu.rt_runtime_us 950000 - mkdir /dev/cpuctl/bg_non_interactive - chown system system /dev/cpuctl/bg_non_interactive/tasks - chmod 0666 /dev/cpuctl/bg_non_interactive/tasks - # 5.0 % - write /dev/cpuctl/bg_non_interactive/cpu.shares 52 - write /dev/cpuctl/bg_non_interactive/cpu.rt_period_us 1000000 - # active FIFO threads will never be in BG - write /dev/cpuctl/bg_non_interactive/cpu.rt_runtime_us 10000 - # sets up initial cpusets for ActivityManager mkdir /dev/cpuset mount cpuset none /dev/cpuset |