Adjust cgroup cpu for Tizen
authorKunhoon Baik <knhoon.baik@samsung.com>
Thu, 15 Jul 2021 05:16:27 +0000 (14:16 +0900)
committerKunhoon Baik <knhoon.baik@samsung.com>
Thu, 15 Jul 2021 05:16:27 +0000 (14:16 +0900)
commit0e92cd78456302c63c96dc75a15feea26009b410
tree5c29955aea5e64292998df5e801fd73ab38fd7b2
parent84bcf292ca3a603ca65cef4953a39ee58b2b33c1
Adjust cgroup cpu for Tizen

Latest public Tizen does not support cfs_period_us or cfs_quota_us because CONFIG_FAIR_GROUP_SCHED, CONFIG_CFS_BANDWIDTH are not enabled.
Thus, instead of strict cpu limitation using cfs_quota, use cpu_shares.
The cpu_shares of each NSJAIL process will be assigned according to ratio (cfs_quota/cfs_period)

This is temporary patch and is not well validated.
Tizen will consider to enable the kernel option for cfs_quota_us.
cgroup.cc
packaging/nsjail.spec