From fcfc7e11370f3c0f9f50f6f046b44f7543cf3397 Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Wed, 3 Jul 2019 16:11:47 +0200 Subject: [PATCH] basic: reorder UnitType enum 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 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/basic/unit-def.h b/src/basic/unit-def.h index dd226549f4..c7b4235bea 100644 --- a/src/basic/unit-def.h +++ b/src/basic/unit-def.h @@ -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, -- 2.25.1