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 <bvanassche@google.com>
diff --git a/libprocessgroup/profiles/task_profiles.json b/libprocessgroup/profiles/task_profiles.json
index 2c08b0b..f2ef316 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"
+ }
}
]
},