Modify setting scheduling priority 10/293310/5
authorHwankyu Jhun <h.jhun@samsung.com>
Wed, 24 May 2023 08:51:34 +0000 (08:51 +0000)
committerHwanKyu Jhun <h.jhun@samsung.com>
Thu, 25 May 2023 04:04:33 +0000 (04:04 +0000)
commit7280e2dab9c89062586235bd3985f6f883746497
tree65c48bc950cab67d59b10b4ddb7f481f9883ccc9
parent390e2e1be86a10aa67d7828752e4379ac6e04d8b
Modify setting scheduling priority

To set the scheduling priority properly, the launchpad-process-pool
sends the priority to the child process. And, after calling fork(),
the child process creates a new session using setsid().
The argument of the setpriority() is changed to PRIO_PGRP from PRIO_PROCESS.
The hydra loader changes the priority to 0 to restore to its original state.

Change-Id: Ie5d5d6d55493934c7706b32789d35697d05285d6
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
17 files changed:
src/launchpad-process-pool/app_executor.cc
src/launchpad-process-pool/app_executor.hh
src/launchpad-process-pool/executor.cc
src/launchpad-process-pool/hydra_loader_context.cc
src/launchpad-process-pool/loader_context.cc
src/launchpad-process-pool/loader_context.hh
src/launchpad-process-pool/loader_executor.cc
src/lib/common/src/launchpad_common.c
src/lib/launchpad-common/hydra_request.cc
src/lib/launchpad-common/hydra_request.hh
src/lib/launchpad-common/sched_priority.cc [new file with mode: 0644]
src/lib/launchpad-common/sched_priority.hh [new file with mode: 0644]
src/lib/launchpad-glib/util.cc
src/lib/launchpad-glib/util.hh
src/lib/launchpad-hydra/executor.cc
src/lib/launchpad-hydra/launchpad_hydra.cc
src/lib/launchpad-hydra/loader_executor.cc