Merge changes from topic 'remove_bg_cgroup'

* changes:
  libcutils: only change cgroup when fd is initialized
  init.rc: remove bg_non_interactive cgroup
This commit is contained in:
Treehugger Robot 2017-03-21 22:09:50 +00:00 committed by Gerrit Code Review
commit e941c5fa41
2 changed files with 1 additions and 10 deletions

View File

@ -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;
}

View File

@ -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