From 1943ee4296773b33f794ef13ffe108d9790da689 Mon Sep 17 00:00:00 2001 From: Changgyu Choi Date: Thu, 17 Aug 2023 19:26:27 +0900 Subject: [PATCH 01/16] Release version 0.36.6 Changes: - Fix crash issue Change-Id: I820f4de159dae3bccfd592bd832d2d79951d51f1 Signed-off-by: Changgyu Choi --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index 2df8a0a..dbca123 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.36.5 +Version: 0.36.6 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4 From 00886c1cf25c421d2c891560600c7d9acfd52898 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Fri, 18 Aug 2023 13:56:24 +0900 Subject: [PATCH 02/16] Remove timeout setting of applying cpu boosting Unfortunately, the plugin module of the resource API does not support timeout feature properly. According to the guide, if the timeout setting exists, we must not call the resource_clear_cpu_boosting() function. This patch changes the timeout argument to -1 from the 5000 (milliseconds). Change-Id: Ice734819300b11d150231a149b6529cb92315281 Signed-off-by: Hwankyu Jhun --- src/launchpad-process-pool/launchpad.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/launchpad-process-pool/launchpad.cc b/src/launchpad-process-pool/launchpad.cc index bc51ef5..13bc490 100644 --- a/src/launchpad-process-pool/launchpad.cc +++ b/src/launchpad-process-pool/launchpad.cc @@ -196,8 +196,7 @@ Launchpad::Launchpad(int argc, char** argv) std::placeholders::_1) }, }; - CPUBoostController::DoBoost(getpid(), CPUBoostController::Level::Strong, - 5000); + CPUBoostController::DoBoost(getpid(), CPUBoostController::Level::Strong, -1); g_timeout_add(1000, [](gpointer data) { CPUBoostController::Clear(getpid()); return G_SOURCE_REMOVE; -- 2.7.4 From fc422b70c1490fb6cfc01545f3840749a4d421b5 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Mon, 21 Aug 2023 09:31:39 +0900 Subject: [PATCH 03/16] Release version 0.36.7 Changes: - Remove timeout setting of applying cpu boosting Change-Id: Ic39e5674387538b20622bba6d058840a37baabab Signed-off-by: Hwankyu Jhun --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index dbca123..ec21ffb 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.36.6 +Version: 0.36.7 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4 From 1988852bce7b2ced3359a48528f319041dd4c501 Mon Sep 17 00:00:00 2001 From: Changgyu Choi Date: Wed, 23 Aug 2023 15:16:10 +0900 Subject: [PATCH 04/16] Add setting priority to 0 before OnAdapterLoopBegin() Change-Id: Ib72a523d8e3e2fd5700f7bbcc92e3ec2b6c3eee3 Signed-off-by: Changgyu Choi --- src/lib/launchpad/launchpad_loader.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/launchpad/launchpad_loader.cc b/src/lib/launchpad/launchpad_loader.cc index e7d733c..57816c2 100644 --- a/src/lib/launchpad/launchpad_loader.cc +++ b/src/lib/launchpad/launchpad_loader.cc @@ -36,6 +36,7 @@ #include "launchpad/log_private.hh" #include "launchpad/step_prepare_execution.hh" #include "launchpad/thread_control.hh" +#include "launchpad-common/sched_priority.hh" namespace launchpad { namespace { @@ -110,6 +111,7 @@ int LaunchpadLoader::Run(loader_lifecycle_callback_s* callback, return -1; } + SchedPriority::Set(0); OnAdapterLoopBegin(); return OnTerminate(); } -- 2.7.4 From 2023e95e8ab4f9d86211146c66fbf2cc9a838959 Mon Sep 17 00:00:00 2001 From: Changgyu Choi Date: Wed, 23 Aug 2023 15:33:13 +0900 Subject: [PATCH 05/16] Release version 0.36.8 Changes: - Add setting priority to 0 before OnAdapterLoopBegin() Change-Id: Ia254a37b83a5eb425df7e0fac98d7682f6ca99a6 Signed-off-by: Changgyu Choi --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index ec21ffb..e7b21f7 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.36.7 +Version: 0.36.8 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4 From b44132d5569dfe5ee9de56fd54b11529be06e8dc Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Mon, 28 Aug 2023 14:42:32 +0900 Subject: [PATCH 06/16] Check CPU boosting level before calling boost API If the boosting is already applied to the launchpad-process-pool, calling the resource_set_cpu_boosting() is not needed. Change-Id: I14e564fa644e312c7eb6ca1305b222dd208ff3ca Signed-off-by: Hwankyu Jhun --- src/launchpad-process-pool/launchpad.cc | 13 +++++++- src/lib/launchpad-common/cpu_boost_controller.cc | 38 ++++++++++++++++++++++++ src/lib/launchpad-common/cpu_boost_controller.hh | 1 + 3 files changed, 51 insertions(+), 1 deletion(-) diff --git a/src/launchpad-process-pool/launchpad.cc b/src/launchpad-process-pool/launchpad.cc index 13bc490..4733c99 100644 --- a/src/launchpad-process-pool/launchpad.cc +++ b/src/launchpad-process-pool/launchpad.cc @@ -196,7 +196,18 @@ Launchpad::Launchpad(int argc, char** argv) std::placeholders::_1) }, }; - CPUBoostController::DoBoost(getpid(), CPUBoostController::Level::Strong, -1); + CPUBoostController::Level level; + int ret = CPUBoostController::GetBoostLevel(getpid(), &level); + if (ret != 0) + CPUBoostController::Clear(getpid()); + + if (ret != 0 || + level == CPUBoostController::Level::None || + level == CPUBoostController::Level::Weak) { + CPUBoostController::DoBoost(getpid(), CPUBoostController::Level::Strong, + -1); + } + g_timeout_add(1000, [](gpointer data) { CPUBoostController::Clear(getpid()); return G_SOURCE_REMOVE; diff --git a/src/lib/launchpad-common/cpu_boost_controller.cc b/src/lib/launchpad-common/cpu_boost_controller.cc index eb06ffe..c72d80b 100644 --- a/src/lib/launchpad-common/cpu_boost_controller.cc +++ b/src/lib/launchpad-common/cpu_boost_controller.cc @@ -18,6 +18,8 @@ #include +#include + #include "launchpad-common/log_private.hh" namespace launchpad { @@ -58,4 +60,40 @@ void CPUBoostController::Clear(pid_t pid) { _D("resource_clear_cpu_boosting() is successful"); } +int CPUBoostController::GetBoostLevel(pid_t pid, + CPUBoostController::Level* level) { + if (pid < 1 || level == nullptr) { + _E("Invalid parameter"); + return -EINVAL; + } + + resource_pid_t res_pid = { + .pid = 0, + .tid = &pid, + .tid_count = 1, + }; + cpu_boosting_level_info_t info; + _W("resource_get_cpu_boosting_level() ++"); + int ret = resource_get_cpu_boosting_level(res_pid, &info); + _W("resource_get_cpu_boosting_level() --"); + if (ret != 0) { + _E("resource_get_cpu_boosting_level() is failed. error: %d", ret); + return -1; + } + + std::unique_ptr auto_free(info.tid_level, + std::free); + + if (info.tid_level[0] == CPU_BOOSTING_LEVEL_STRONG) + *level = CPUBoostController::Level::Strong; + else if (info.tid_level[0] == CPU_BOOSTING_LEVEL_MEDIUM) + *level = CPUBoostController::Level::Medium; + else if (info.tid_level[0] == CPU_BOOSTING_LEVEL_WEAK) + *level = CPUBoostController::Level::Weak; + else + *level = CPUBoostController::Level::None; + + return 0; +} + } // namespace launchpad diff --git a/src/lib/launchpad-common/cpu_boost_controller.hh b/src/lib/launchpad-common/cpu_boost_controller.hh index 308f598..ae0df27 100644 --- a/src/lib/launchpad-common/cpu_boost_controller.hh +++ b/src/lib/launchpad-common/cpu_boost_controller.hh @@ -35,6 +35,7 @@ class EXPORT_API CPUBoostController { static void DoBoost(pid_t pid, Level level, int timeout_msec); static void Clear(pid_t pid); + static int GetBoostLevel(pid_t pid, Level* level); }; } // namespace launchpad -- 2.7.4 From 59e413be0fdbfe1387938e4d68df87084db2397e Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Mon, 28 Aug 2023 15:28:28 +0900 Subject: [PATCH 07/16] Release version 0.36.9 Changes: - Check CPU boosting level before calling boost API Change-Id: Ib8b62f651161c9d4f11c369d015a2639178cc708 Signed-off-by: Hwankyu Jhun --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index e7b21f7..3b57eaa 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.36.8 +Version: 0.36.9 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4 From 2dde3302007ef8fa63c754f8a86339e87884f098 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 30 Aug 2023 13:39:43 +0900 Subject: [PATCH 08/16] Handle restart request Some platform developer wants to restart the loader process directly. This patch supports the restart command. Change-Id: I003891a8a9e5160c9b43d5ca11a61f3b79742662 Signed-off-by: Hwankyu Jhun --- src/launchpad-process-pool/launchpad.cc | 23 +++++++++++++++++++++++ src/launchpad-process-pool/launchpad.hh | 1 + src/lib/launchpad-common/types.hh | 1 + 3 files changed, 25 insertions(+) diff --git a/src/launchpad-process-pool/launchpad.cc b/src/launchpad-process-pool/launchpad.cc index 4733c99..672bc98 100644 --- a/src/launchpad-process-pool/launchpad.cc +++ b/src/launchpad-process-pool/launchpad.cc @@ -194,6 +194,9 @@ Launchpad::Launchpad(int argc, char** argv) { PadCmd::KillLoader, std::bind(&Launchpad::HandleKillLoaderRequest, this, std::placeholders::_1) }, + { PadCmd::RestartLoader, + std::bind(&Launchpad::HandleRestartLoaderRequest, this, + std::placeholders::_1) }, }; CPUBoostController::Level level; @@ -588,6 +591,26 @@ void Launchpad::HandleKillLoaderRequest(std::shared_ptr request) { _D("[PAD_CMD_KILL_LOADER] loader_name: %s", loader_name.c_str()); } +void Launchpad::HandleRestartLoaderRequest(std::shared_ptr request) { + auto& b = request->GetBundle(); + auto loader_name = b.GetString(kAulLoaderName); + auto loader_context = + LoaderManager::GetInst().FindLoaderContextFromName(loader_name); + if (loader_context == nullptr) { + _E("Failed to find loader context. loader_name(%s)", loader_name.c_str()); + return; + } + + if (loader_context->RefCount() == 0) + loader_context->Dispose(); + + if (loader_context->GetPid() < 1) + loader_context->Prepare(); + + _D("[PAD_CMD_RESTART_LOADER] loader_name: %s, pid: %d", + loader_name.c_str(), loader_context->GetPid()); +} + void Launchpad::OnIOEventReceived(int fd, int condition) { auto client_socket = socket_->Accept(); if (!client_socket) { diff --git a/src/launchpad-process-pool/launchpad.hh b/src/launchpad-process-pool/launchpad.hh index b287375..acf7670 100644 --- a/src/launchpad-process-pool/launchpad.hh +++ b/src/launchpad-process-pool/launchpad.hh @@ -77,6 +77,7 @@ class Launchpad : public IOChannel::IEvent, void HandleConnectRequest(std::shared_ptr request); void HandleLaunchRequest(std::shared_ptr request); void HandleKillLoaderRequest(std::shared_ptr request); + void HandleRestartLoaderRequest(std::shared_ptr request); bool CanUseLoaderContext(const std::shared_ptr& context); LaunchResult ForkProcessing(std::shared_ptr request); diff --git a/src/lib/launchpad-common/types.hh b/src/lib/launchpad-common/types.hh index dca55f4..7483b36 100644 --- a/src/lib/launchpad-common/types.hh +++ b/src/lib/launchpad-common/types.hh @@ -58,6 +58,7 @@ enum PadCmd { PrepareAppDefinedLoader = 17, Connect = 18, KillLoader = 19, + RestartLoader = 20, }; enum PadLoaderId { -- 2.7.4 From 6c6353ca4d0035dcc2c2cfed17c801dee40fca7a Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 30 Aug 2023 14:52:38 +0900 Subject: [PATCH 09/16] Release version 0.37.0 Changes: - Handle restart request Change-Id: Ia6e7b0b58772a7ecbfe27100882574da17c801d7 Signed-off-by: Hwankyu Jhun --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index 3b57eaa..d01adca 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.36.9 +Version: 0.37.0 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4 From 774e3f3d04db8aa4c4a9e2f6536cdbf30f2f03a9 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Tue, 29 Aug 2023 15:53:57 +0900 Subject: [PATCH 10/16] Do not close all file descriptors When the loader fails to find the main function, it tries to execute an application using execv(). Before calling execv(), the loader closes all opened file descriptors. Unfortunately, the loader can have crashed by that. To avoid crash issues, this patch removes calling CloseAllFds(). Change-Id: I902d2f73ae30dc63e4d82599da6c1ced436e3920 Signed-off-by: Hwankyu Jhun --- src/app-defined-loader/app-defined-loader.cc | 1 - src/launchpad-loader/launchpad_loader.cc | 1 - 2 files changed, 2 deletions(-) diff --git a/src/app-defined-loader/app-defined-loader.cc b/src/app-defined-loader/app-defined-loader.cc index 57e7ffd..a135dc7 100644 --- a/src/app-defined-loader/app-defined-loader.cc +++ b/src/app-defined-loader/app-defined-loader.cc @@ -183,7 +183,6 @@ class AppDefinedLoader { argv_[0], errno, strerror_r(errno, err_str, sizeof(err_str))); } else { SECURE_LOGD("[candidate] Exec application (%s)", argv_[0]); - launchpad::Util::CloseAllFds(); if (!libdir.empty()) setenv("LD_LIBRARY_PATH", libdir.c_str(), 1); unsetenv("AUL_LOADER_INIT"); diff --git a/src/launchpad-loader/launchpad_loader.cc b/src/launchpad-loader/launchpad_loader.cc index cc62aa1..83cb8e3 100644 --- a/src/launchpad-loader/launchpad_loader.cc +++ b/src/launchpad-loader/launchpad_loader.cc @@ -265,7 +265,6 @@ int LaunchpadLoader::DoExec(int argc, char** argv, const std::string& lib_dir) { SECURE_LOGE("access() is failed. path(%s), errno(%d)", argv[0], errno); SECURE_LOGD("Execute application. path(%s)", argv[0]); - Util::CloseAllFds(); if (!lib_dir.empty()) setenv("LD_LIBRARY_PATH", lib_dir.c_str(), 1); -- 2.7.4 From 3ffa334c436fd09a31c4fb2433027da0d2cff49e Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 30 Aug 2023 15:54:22 +0900 Subject: [PATCH 11/16] Release version 0.37.1 Changes: - Do not close all file descriptors Change-Id: I4e9a8784972eee74a9d4d3e5a57ef5fa4cb775ef Signed-off-by: Hwankyu Jhun --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index d01adca..7733bf5 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.37.0 +Version: 0.37.1 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4 From e77648b26fd400670e5a9fb852fb395ecdd5e2e5 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Thu, 31 Aug 2023 08:23:25 +0900 Subject: [PATCH 12/16] Modify ready file path The ready file path is changed to "/tmp/.-.ready". Change-Id: Ia8b59a289b8181be53ef35edb78a89e52c830bb7 Signed-off-by: Hwankyu Jhun --- src/launchpad-process-pool/loader_context.cc | 10 ++++++++-- src/launchpad-process-pool/loader_context.hh | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/launchpad-process-pool/loader_context.cc b/src/launchpad-process-pool/loader_context.cc index b47e57d..10b2b87 100644 --- a/src/launchpad-process-pool/loader_context.cc +++ b/src/launchpad-process-pool/loader_context.cc @@ -674,11 +674,16 @@ void LoaderContext::OnIOEventReceived(int fd, int condition) { } void LoaderContext::CreateReadyFile() { - std::string path = "/run/aul/daemons/" + std::to_string(getuid()) + "/." + + if (ready_file_created_) + return; + + std::string path = "/tmp/." + std::to_string(getuid()) + "-" + GetLoaderName() + ".ready"; std::filesystem::path file_path(path); - if (std::filesystem::exists(file_path)) + if (std::filesystem::exists(file_path)) { + ready_file_created_ = true; return; + } std::ofstream file_stream(file_path); if (!file_stream.is_open()) { @@ -692,6 +697,7 @@ void LoaderContext::CreateReadyFile() { _E("smack_setlabel() is failed. path: %s, errno: %d", path.c_str(), errno); _W("File(%s) created successfully", path.c_str()); + ready_file_created_ = true; } } // namespace launchpad diff --git a/src/launchpad-process-pool/loader_context.hh b/src/launchpad-process-pool/loader_context.hh index 1bba362..feaf15d 100644 --- a/src/launchpad-process-pool/loader_context.hh +++ b/src/launchpad-process-pool/loader_context.hh @@ -154,6 +154,7 @@ class LoaderContext : public std::enable_shared_from_this, std::vector condition_path_exists_; IEvent* listener_ = nullptr; uint32_t ref_count_ = 0; + bool ready_file_created_ = false; }; } // namespace launchpad -- 2.7.4 From ac1616d6b03f30480842989e25af1463ba300e98 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Thu, 31 Aug 2023 09:12:19 +0900 Subject: [PATCH 13/16] Release version 0.37.2 Changes: - Modify ready file path Change-Id: I2a6e4eb25fbfc7fc60dd9629dad7c2e51408dbd2 Signed-off-by: Hwankyu Jhun --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index 7733bf5..eeba3b3 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.37.1 +Version: 0.37.2 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4 From 56af157d856415e171aa6eb6d73a2fe6cae4b82f Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Fri, 1 Sep 2023 08:01:40 +0900 Subject: [PATCH 14/16] Set reset on fork flag The CPU_BOOSTING_RESET_ON_FORK flag is required in order not to unintentionally inherit the CPU boosting to child processes. Change-Id: Ie0573b18d1e595f7d59e0cc3e76c8784fbceffd4 Signed-off-by: Hwankyu Jhun --- src/launchpad-process-pool/launchpad.cc | 2 +- src/lib/launchpad-common/cpu_boost_controller.cc | 7 ++++--- src/lib/launchpad-common/cpu_boost_controller.hh | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/launchpad-process-pool/launchpad.cc b/src/launchpad-process-pool/launchpad.cc index 672bc98..c1f0f9b 100644 --- a/src/launchpad-process-pool/launchpad.cc +++ b/src/launchpad-process-pool/launchpad.cc @@ -208,7 +208,7 @@ Launchpad::Launchpad(int argc, char** argv) level == CPUBoostController::Level::None || level == CPUBoostController::Level::Weak) { CPUBoostController::DoBoost(getpid(), CPUBoostController::Level::Strong, - -1); + -1, true); } g_timeout_add(1000, [](gpointer data) { diff --git a/src/lib/launchpad-common/cpu_boost_controller.cc b/src/lib/launchpad-common/cpu_boost_controller.cc index c72d80b..615adbd 100644 --- a/src/lib/launchpad-common/cpu_boost_controller.cc +++ b/src/lib/launchpad-common/cpu_boost_controller.cc @@ -24,7 +24,8 @@ namespace launchpad { -void CPUBoostController::DoBoost(pid_t pid, Level level, int timeout_msec) { +void CPUBoostController::DoBoost(pid_t pid, Level level, int timeout_msec, + bool reset_on_fork) { if (pid < 1) return; @@ -33,10 +34,10 @@ void CPUBoostController::DoBoost(pid_t pid, Level level, int timeout_msec) { .tid = &pid, .tid_count = 1, }; - + int flag = reset_on_fork ? CPU_BOOSTING_RESET_ON_FORK : 0; int ret = resource_set_cpu_boosting(res_pid, static_cast(level), - static_cast(0), timeout_msec); + static_cast(flag), timeout_msec); if (ret != 0) _E("resource_set_cpu_boosting() is failed. error: %d", ret); else diff --git a/src/lib/launchpad-common/cpu_boost_controller.hh b/src/lib/launchpad-common/cpu_boost_controller.hh index ae0df27..715b4bd 100644 --- a/src/lib/launchpad-common/cpu_boost_controller.hh +++ b/src/lib/launchpad-common/cpu_boost_controller.hh @@ -33,7 +33,8 @@ class EXPORT_API CPUBoostController { Weak, }; - static void DoBoost(pid_t pid, Level level, int timeout_msec); + static void DoBoost(pid_t pid, Level level, int timeout_msec, + bool reset_on_fork = false); static void Clear(pid_t pid); static int GetBoostLevel(pid_t pid, Level* level); }; -- 2.7.4 From c08706a5075698321681cc7f3206e99966c26490 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Fri, 1 Sep 2023 11:09:46 +0900 Subject: [PATCH 15/16] Release version 0.37.3 Changes: - Set reset on fork flag Change-Id: I505a0e223308029def83ce0458976830e0746144 Signed-off-by: Hwankyu Jhun --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index eeba3b3..7b67395 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.37.2 +Version: 0.37.3 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4 From 10c16111a76745bbcf57e5570ddc9ed95ba9b94d Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Mon, 11 Sep 2023 12:57:57 +0900 Subject: [PATCH 16/16] Reset scheduling priority This patch removes calling the SchedPriority::Set(0) from the launchpad library. After this patch is applied, the loader process should reset the priority to zero itself. Change-Id: I93b1e435ab4ebbe9d21b790c547010e39321dabe Signed-off-by: Hwankyu Jhun --- src/app-defined-loader/app-defined-loader.cc | 3 +++ src/launchpad-loader/launchpad_loader.cc | 2 ++ src/lib/launchpad/launchpad_loader.cc | 1 - 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app-defined-loader/app-defined-loader.cc b/src/app-defined-loader/app-defined-loader.cc index a135dc7..1d55100 100644 --- a/src/app-defined-loader/app-defined-loader.cc +++ b/src/app-defined-loader/app-defined-loader.cc @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -156,6 +157,8 @@ class AppDefinedLoader { _E("Plugin::PrepareApp() is failed. error(%d)", ret); _exit(EXIT_FAILURE); } + + SchedPriority::Set(0); } static int OnLaunch(int argc, char** argv, const char* app_path, diff --git a/src/launchpad-loader/launchpad_loader.cc b/src/launchpad-loader/launchpad_loader.cc index 83cb8e3..d1cdf6f 100644 --- a/src/launchpad-loader/launchpad_loader.cc +++ b/src/launchpad-loader/launchpad_loader.cc @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -174,6 +175,7 @@ void LaunchpadLoader::OnCreate(const tizen_base::Bundle& extra, int type) { InitializeElementary(); hw_acc_config_.reset(new launchpad::HWAccelerationConfig()); + SchedPriority::Set(0); } int LaunchpadLoader::OnLaunch(const LaunchArgs& args) { diff --git a/src/lib/launchpad/launchpad_loader.cc b/src/lib/launchpad/launchpad_loader.cc index 57816c2..d6815ef 100644 --- a/src/lib/launchpad/launchpad_loader.cc +++ b/src/lib/launchpad/launchpad_loader.cc @@ -111,7 +111,6 @@ int LaunchpadLoader::Run(loader_lifecycle_callback_s* callback, return -1; } - SchedPriority::Set(0); OnAdapterLoopBegin(); return OnTerminate(); } -- 2.7.4