خرید بک لینک

Vote count: 0

In the init.rc ,I can see that lollipop create a root directory mounted with memory, and a child cgroup called sw is created under the root.

mount tmpfs none /sys/fs/cgroup mode=0750,uid=0,gid=1000
mkdir /sys/fs/cgroup/memory 0750 root system
mount cgroup none /sys/fs/cgroup/memory memory
write /sys/fs/cgroup/memory/memory.move_charge_at_immigrate 1
chown root system /sys/fs/cgroup/memory/tasks
chmod 0660 /sys/fs/cgroup/memory/tasks
mkdir /sys/fs/cgroup/memory/sw 0750 root system
write /sys/fs/cgroup/memory/sw/memory.swappiness 100
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

I know that the root cgroup is used in lmkd.c. But I don't know what the sw directory is used for?when using "cat tasks" under sw on an Android phone, I can see that some tasks is moved into the sw group.What is the different between root and sw cgroup? And how to find the code in Android where PID is moved into sw/tasks

asked 56 secs ago

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 19 فروردين 1395 ساعت: 15:26

صفحه بندی