Fixed cgroup directory creation and permissions.

Copied lines pertaining to cgroups creation from stock init.rc file
and placed them in the device init.rc. Tried loading modules at boot,
did not seem to work.
diff --git a/rootdir/etc/init.rc b/rootdir/etc/init.rc
index 7baedbd..ddb6b54 100644
--- a/rootdir/etc/init.rc
+++ b/rootdir/etc/init.rc
@@ -74,6 +74,7 @@
     write /sys/fs/cgroup/memory/sw/memory.move_charge_at_immigrate 1
     chown root system /sys/fs/cgroup/memory/sw/tasks
     chmod 0660 /sys/fs/cgroup/memory/sw/tasks
+    chmod 0220 /sys/fs/cgroup/memory/cgroup.event_control
 
     mkdir /system
     mkdir /data 0771 system system
@@ -138,7 +139,7 @@
     chmod 0660 /dev/cpuctl/tasks
     write /dev/cpuctl/cpu.shares 1024
     write /dev/cpuctl/cpu.rt_runtime_us 950000
-    write /dev/cpuctl/cpu.rt_period_us 1000000
+    write /dev/cpuctl/cpu.rt_period_us 1000000  
 
     mkdir /dev/cpuctl/apps
     chown system system /dev/cpuctl/apps/tasks
@@ -154,6 +155,24 @@
     write /dev/cpuctl/apps/bg_non_interactive/cpu.shares 52
     write /dev/cpuctl/apps/bg_non_interactive/cpu.rt_runtime_us 700000
     write /dev/cpuctl/apps/bg_non_interactive/cpu.rt_period_us 1000000
+    
+    # Create cgroup mount points for process groups
+    mkdir /dev/cpuctl
+    mount cgroup none /dev/cpuctl cpu
+    chown system system /dev/cpuctl
+    chown system system /dev/cpuctl/tasks
+    chmod 0666 /dev/cpuctl/tasks
+    write /dev/cpuctl/cpu.shares 1024
+    write /dev/cpuctl/cpu.rt_runtime_us 800000
+    write /dev/cpuctl/cpu.rt_period_us 1000000
+
+    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_runtime_us 700000
+    write /dev/cpuctl/bg_non_interactive/cpu.rt_period_us 1000000
 
     # qtaguid will limit access to specific data based on group memberships.
     #   net_bw_acct grants impersonation of socket owners.
@@ -200,6 +219,21 @@
     # issued fs triggers have completed.
     trigger load_all_props_action
 
+	modprobe ansi_cprng
+	modprobe core_ctl
+	modprobe dma_test
+	modprobe evbug
+	modprobe gator
+	modprobe mmc_block_test
+	modprobe mmc_test
+	modprobe msm-buspm-dev
+	modprobe oprofile
+	modprobe radio-iris-transport
+	modprobe spidev
+	modprobe tcp_htcp
+	modprobe tcp_westwood
+	modprobe test-iosched
+
     # Remove a file to wake up anything waiting for firmware.
     trigger firmware_mounts_complete