Revert "Add cpu priority inheritance" 58/278658/2
authorChanggyu Choi <changyu.choi@samsung.com>
Mon, 25 Jul 2022 01:45:27 +0000 (10:45 +0900)
committerChanggyu Choi <changyu.choi@samsung.com>
Mon, 25 Jul 2022 02:30:31 +0000 (11:30 +0900)
This reverts commit b67f9e7e9a31a6b2ff4f2867d2c63edd9fda7209.

Change-Id: I80317085c0a8b60ce463ab855313716f27d8709f
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
CMakeLists.txt
packaging/launchpad.spec
src/launchpad-process-pool/CMakeLists.txt
src/launchpad-process-pool/src/launchpad.c

index 267df09..fb3d5ca 100644 (file)
@@ -70,6 +70,5 @@ PKG_CHECK_MODULES(SECURITY_MANAGER_DEPS REQUIRED security-manager)
 PKG_CHECK_MODULES(TANCHOR_DEPS REQUIRED tanchor)
 PKG_CHECK_MODULES(TTRACE_DEPS REQUIRED ttrace)
 PKG_CHECK_MODULES(VCONF_DEPS REQUIRED vconf)
-PKG_CHECK_MODULES(CAPI_SYSTEM_RESOURCE_DEPS REQUIRED capi-system-resource)
 
 ADD_SUBDIRECTORY(src)
index 001dcc0..aeb02df 100644 (file)
@@ -33,7 +33,6 @@ BuildRequires:  pkgconfig(iniparser)
 BuildRequires:  pkgconfig(libxml-2.0)
 BuildRequires:  pkgconfig(libsmack)
 BuildRequires:  pkgconfig(pkgmgr-installer)
-BuildRequires:  pkgconfig(capi-system-resource)
 
 Requires(post): /sbin/ldconfig
 Requires(post): /usr/bin/systemctl
@@ -192,3 +191,4 @@ ln -sf ../launchpad-process-pool.service %{buildroot}%{_unitdir_user}/basic.targ
 %{_libdir}/*.so
 %{_libdir}/pkgconfig/liblaunchpad.pc
 %{_libdir}/pkgconfig/liblaunchpad-hydra.pc
+
index caec083..b0af4fe 100644 (file)
@@ -39,7 +39,6 @@ APPLY_PKG_CONFIG(${TARGET_LAUNCHPAD_PROCESS_POOL} PUBLIC
   TANCHOR_DEPS
   TTRACE_DEPS
   VCONF_DEPS
-  CAPI_SYSTEM_RESOURCE_DEPS
 )
 
 TARGET_LINK_LIBRARIES(${TARGET_LAUNCHPAD_PROCESS_POOL} PUBLIC "-lm -ldl")
index 745ffa4..79bc219 100644 (file)
@@ -15,7 +15,6 @@
  */
 
 #define _GNU_SOURCE
-#include <cpu-boosting.h>
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -73,7 +72,6 @@
 #define LOADERS_PATH "loaders"
 #define APP_DEFINED_LOADER_INFO_PATH   OPT_SHARE_PATH "/" LOADERS_PATH
 #define COMMON_LOADER_NAME "common-loader1"
-#define LAUNCHPAD_PROCESS_NAME "launchpad-process-pool"
 
 #define LAUNCHER_INFO_PATH     LOADER_INFO_PATH
 #define REGULAR_UID_MIN 5000
@@ -786,13 +784,6 @@ static int __fork_app_process(int (*child_fn)(void *), void *arg)
        }
 
        if (pid == 0) {
-               resource_pid_t resource_st = {
-                       pid = getpid(),
-               };
-               ret = resource_clear_cpu_boosting(resource_st);
-               if (ret != 0)
-                       _E("Failed to clear cpu boosting. error(%d)", ret);
-
                _W("security_manager_prepare_app_candidate ++");
                ret = security_manager_prepare_app_candidate();
                _W("security_manager_prepare_app_candidate --");
@@ -3165,9 +3156,6 @@ static gboolean __launchpad_recovery_cb(gpointer data)
 static int __before_loop(int argc, char **argv)
 {
        int ret;
-       resource_pid_t resource_st = {
-               .pid = getpid(),
-       };
 
        _print_hwc_log("%s(%d): START", __FUNCTION__, __LINE__);
        ret = __sequencer_init();
@@ -3239,27 +3227,11 @@ static int __before_loop(int argc, char **argv)
        _log_init();
        _print_hwc_log("%s(%d): END", __FUNCTION__, __LINE__);
 
-       ret = resource_register_cpu_inheritance_destination(
-                       (char*)LAUNCHPAD_PROCESS_NAME, resource_st);
-       if (ret != 0) {
-               _E("Failed to register cpu inheritance destination. error(%d)",
-                               ret);
-       }
-
        return 0;
 }
 
 static void __after_loop(void)
 {
-       int ret;
-
-       ret = resource_unregister_cpu_inheritance_destination(
-                       (char*)LAUNCHPAD_PROCESS_NAME);
-       if (ret != 0) {
-               _E("Failed to unregister cpu inheritance destination. "
-                               "error(%d)", ret);
-       }
-
        _log_fini();
        _memory_monitor_fini();
        __unregister_vconf_events();