Skip to content

Commit

Permalink
Revert "init: create native cgroup"
Browse files Browse the repository at this point in the history
This reverts commit 3f8c938.

The tasks created outside the android framework are moved to
"native" cgroup from "root" cgroup, which otherwise have more
CPU scheduling share compared to tasks in "apps" cgroup.
The "apps" cgroup is removed in Android 5.1 release. Now all
tasks except background (low priority) tasks are run under root.
The tasks under "native" cgroup are experiencing higher scheduling
latency compared to other tasks. Remove "native" cgroup as it is
not required anymore.

Change-Id: I4c194dc8db5e8b2e34c776020a8c94e0aec3b0b4
  • Loading branch information
Pavankumar Kondeti committed Jun 22, 2015
1 parent d48bc0c commit 7c02b18
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions rootdir/etc/init.qcom.post_boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1118,36 +1118,3 @@ case "$target" in
echo $oem_version > /sys/devices/soc0/image_crm_version
;;
esac

# Create native cgroup and move all tasks to it. Allot 15% real-time
# bandwidth limit to native cgroup (which is what remains after
# Android uses up 80% real-time bandwidth limit). root cgroup should
# become empty after all tasks are moved to native cgroup.

CGROUP_ROOT=/dev/cpuctl
mkdir $CGROUP_ROOT/native
echo 150000 > $CGROUP_ROOT/native/cpu.rt_runtime_us

# We could be racing with task creation, as a result of which its possible that
# we may fail to move all tasks from root cgroup to native cgroup in one shot.
# Retry few times before giving up.

for loop_count in 1 2 3
do
for i in $(cat $CGROUP_ROOT/tasks)
do
echo $i > $CGROUP_ROOT/native/tasks
done

root_tasks=$(cat $CGROUP_ROOT/tasks)
if [ -z "$root_tasks" ]
then
break
fi
done

# Check if we failed to move all tasks from root cgroup
if [ ! -z "$root_tasks" ]
then
echo "Error: Could not move all tasks to native cgroup"
fi

0 comments on commit 7c02b18

Please sign in to comment.