From 9bba87244d6bbf46e776834d0917b2dd1143f31d Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 28 Sep 2023 15:18:56 -0700 Subject: [PATCH] task_profiles.json: Set io.prio.class Provide an additional way to request the block layer to prioritize foreground I/O over background I/O. This patch prepares for tests with the mq-deadline I/O scheduler. While CFQ and BFQ support a "weight" cgroup attribute, the mq-deadline scheduler does not. The mq-deadline I/O scheduler only supports the I/O priority class for differentiating I/O priorities. The io.prio.class attribute is declared optional since this attribute only exists if CONFIG_BLK_CGROUP_IOPRIO != n in the kernel configuration. Bug: 186902601 Change-Id: Iee1004cd0996e32245aff2b51772ef40178e024f Signed-off-by: Bart Van Assche --- libprocessgroup/profiles/task_profiles.json | 41 +++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/libprocessgroup/profiles/task_profiles.json b/libprocessgroup/profiles/task_profiles.json index 2c08b0b31..f2ef316e2 100644 --- a/libprocessgroup/profiles/task_profiles.json +++ b/libprocessgroup/profiles/task_profiles.json @@ -91,6 +91,11 @@ "Name": "CfqWeight", "Controller": "io", "File": "io.weight" + }, + { + "Name": "IoPrioClass", + "Controller": "io", + "File": "io.prio.class" } ], @@ -479,6 +484,15 @@ "Value": "200", "Optional": "true" } + }, + { + "Name": "SetAttribute", + "Params": + { + "Name": "IoPrioClass", + "Value": "restrict-to-be", + "Optional": "true" + } } ] }, @@ -511,6 +525,15 @@ "Value": "1000", "Optional": "true" } + }, + { + "Name": "SetAttribute", + "Params": + { + "Name": "IoPrioClass", + "Value": "restrict-to-be", + "Optional": "true" + } } ] }, @@ -543,6 +566,15 @@ "Value": "1000", "Optional": "true" } + }, + { + "Name": "SetAttribute", + "Params": + { + "Name": "IoPrioClass", + "Value": "promote-to-rt", + "Optional": "true" + } } ] }, @@ -575,6 +607,15 @@ "Value": "1000", "Optional": "true" } + }, + { + "Name": "SetAttribute", + "Params": + { + "Name": "IoPrioClass", + "Value": "promote-to-rt", + "Optional": "true" + } } ] },