mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07: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:
+5
-1
@@ -47,7 +47,11 @@ static void group_init(char *path, char *nproc, int share)
|
||||
paste(file, sizeof(file), path, "cpuset.mems");
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user