mirror of
https://github.com/troglobit/finit.git
synced 2026-11-06 15:51:03 +00:00
cgroups: fix cpu.shares assignment and set memory hierarchy
- Fix obvious refactor mistake in cpu.shares assignment - For unified memory hierarchy we need to set .use_hierarch=1 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
6d0c679e05
commit
9842786453
1 file changed
+5
-1
+5
-1
@@ -47,7 +47,11 @@ static void group_init(char *path, char *nproc, int share)
|
|||||||
paste(file, sizeof(file), path, "cpuset.mems");
|
paste(file, sizeof(file), path, "cpuset.mems");
|
||||||
echo(file, 0, "0");
|
echo(file, 0, "0");
|
||||||
|
|
||||||
echo(FINIT_CGPATH "/init/cpu.shares", 0, "%d", share);
|
paste(file, sizeof(file), path, "cpu.shares");
|
||||||
|
echo(file, 0, "%d", share);
|
||||||
|
|
||||||
|
paste(file, sizeof(file), path, "memory.use_hierarchy");
|
||||||
|
echo(file, 0, "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void append_ctrl(char *ctrl)
|
static void append_ctrl(char *ctrl)
|
||||||
|
|||||||
Reference in new issue
Block a user