]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic: reorder UnitType enum
authorMichael Olbrich <m.olbrich@pengutronix.de>
Wed, 3 Jul 2019 14:11:47 +0000 (16:11 +0200)
committerMichael Olbrich <m.olbrich@pengutronix.de>
Thu, 18 Jul 2019 07:54:03 +0000 (09:54 +0200)
The enum order will be used to order jobs in the job queue.
Make sure that unit types that fork aditional processes come first to
maximize parallelism.

src/basic/unit-def.h

index dd226549f4c3e14e5655d497dda102036c512ad5..c7b4235bea7bdbafb47a028c6f06ae9cb7b05c02 100644 (file)
@@ -5,14 +5,17 @@
 
 #include "macro.h"
 
+/* The enum order is used to order unit jobs in the job queue
+ * when other criteria (cpu weight, nice level) are identical.
+ * In this case service units have the hightest priority. */
 typedef enum UnitType {
         UNIT_SERVICE = 0,
+        UNIT_MOUNT,
+        UNIT_SWAP,
         UNIT_SOCKET,
         UNIT_TARGET,
         UNIT_DEVICE,
-        UNIT_MOUNT,
         UNIT_AUTOMOUNT,
-        UNIT_SWAP,
         UNIT_TIMER,
         UNIT_PATH,
         UNIT_SLICE,