]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
manager: order idle jobs
authorLennart Poettering <lennart@poettering.net>
Fri, 19 Jan 2024 13:09:42 +0000 (14:09 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 19 Jan 2024 15:46:28 +0000 (16:46 +0100)
Let's put the run queue really the last spot, as we should only start
doing more work if we really have nothing else to do anymore.

Let's move the service watchdog after the rewatch PID logic for similar
logic: it will possibly result in new jobs being enqueued to stop
things, and we should really have done all other work first.

src/core/manager.h

index 8962c5c66e7cec1ee53f191d7661718d7cc0ff38..ba7c1e28c93bd48399323c1cc5b43dfbfb5e5b00 100644 (file)
@@ -662,7 +662,7 @@ enum {
         EVENT_PRIORITY_TIME_ZONE        = SD_EVENT_PRIORITY_NORMAL-1,
         EVENT_PRIORITY_IPC              = SD_EVENT_PRIORITY_NORMAL,
         EVENT_PRIORITY_REWATCH_PIDS     = SD_EVENT_PRIORITY_IDLE,
-        EVENT_PRIORITY_RUN_QUEUE        = SD_EVENT_PRIORITY_IDLE,
-        EVENT_PRIORITY_SERVICE_WATCHDOG = SD_EVENT_PRIORITY_IDLE,
+        EVENT_PRIORITY_SERVICE_WATCHDOG = SD_EVENT_PRIORITY_IDLE+1,
+        EVENT_PRIORITY_RUN_QUEUE        = SD_EVENT_PRIORITY_IDLE+2,
         /* … to least important */
 };