cgroup: refactor, use a unified hierarchy for finit

As of now, the default finit cgroup behavior is to use a unified
hierarchy of controllers under /sys/fs/cgroup/finit.

We mount cpu,cpuacct,cpuset,memory (if available) and gain the
ability to control our three major groups: init, system, user.

The default CPU share setup is ~10% for init and user, and 90% for
system.  These are guaranteed CPU shares to ensure we do not starve
PID 1 or user processes.  Support for configuring these limits will
be added in a later commit.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2021-03-14 11:07:13 +01:00
1 parent 4e84ecae89
commit 5428dea5bf
5 files changed
+113 -20

No files matched your search

+1 -1
View File
@@ -186,7 +186,7 @@ static int do_login(char *name)
{
struct stat st;
cgroup_user(name);
cgroup_user(name, getpid());
execl(_PATH_LOGIN, _PATH_LOGIN, name, NULL);
/*