aboutsummaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorDamien Le Moal2021-08-11 12:37:01 +0900
committerJens Axboe2021-08-18 07:21:12 -0600
commit202bc942c5cd4340d37b06c4e0b8b03f9925d818 (patch)
treed035b4446726fef7015c835a569f83bf68d8beb3 /include/uapi
parentba05200fcce0a73fa8db16c514fbaa476d1d9399 (diff)
block: Introduce IOPRIO_NR_LEVELS
The BFQ scheduler and ioprio_check_cap() both assume that the RT priority class (IOPRIO_CLASS_RT) can have up to 8 different priority levels, similarly to the BE class (IOPRIO_CLASS_iBE). This is controlled using the IOPRIO_BE_NR macro , which is badly named as the number of levels also applies to the RT class. Introduce the class independent IOPRIO_NR_LEVELS macro, defined to 8, to make things clear. Keep the old IOPRIO_BE_NR macro definition as an alias for IOPRIO_NR_LEVELS. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Link: https://lore.kernel.org/r/20210811033702.368488-6-damien.lemoal@wdc.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/ioprio.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/uapi/linux/ioprio.h b/include/uapi/linux/ioprio.h
index 936f0d8f30e1..aac39338d02c 100644
--- a/include/uapi/linux/ioprio.h
+++ b/include/uapi/linux/ioprio.h
@@ -32,9 +32,10 @@ enum {
};
/*
- * 8 best effort priority levels are supported
+ * The RT and BE priority classes both support up to 8 priority levels.
*/
-#define IOPRIO_BE_NR (8)
+#define IOPRIO_NR_LEVELS 8
+#define IOPRIO_BE_NR IOPRIO_NR_LEVELS
enum {
IOPRIO_WHO_PROCESS = 1,