platform/core/system/resourced.git
9 months agoAdd ISU package 75/305275/1 accepted/tizen/7.0/unified/20240201.165530
Adam Michalski [Tue, 14 Nov 2023 16:22:41 +0000 (17:22 +0100)]
Add ISU package

resourced is a special case. As the service binary performs mounts that must be
visible by the rest of the system, it cannot use any form of sandboxing. That's
why the binary has to be run directly from the ISU package. In addition, different
images may provide different set of configuration files (/etc/resourced/*) and some
configurations may need plugins in the form of shared libraries. As if that was not
enough, the aforementioned plugins may reside in different directories, depending on
the target architecture (as with all shared libraries on Linux systems). Putting all
this together and preparing a correct and roboust ISU configuration is challenging.

The solution is to prepare an ISU package that will work in all these cases:
- any collection of configuration files (/etc/resourced/*)
- any collection of plugins (possibly with no plugins at all)
- support a whole raft of different combinations of the above two.

The solution is based on direct binary file exchange, bind mounting the whole
/etc/resourced directory and bind mounting the whole plugins directory. The latter
is optional (so possibly resourced can run without plugins at all on some
configurations). Bind mounting entire subdirectories allows for the flexibility of
the whole ISU configuration. Please find the implementation details below.

The following changes have been made for ISU:
* isu/isu.cfg - ISU configuration file.
    [isu] section:
        `name` and `version` have been filled by using the #NAME# and #VERSION#
        that will be replaced into the name and version of the RPM package.
        `system_service` is the systemd service name and must be the same as the
        original one. It has also been extended to add two dependent mount units:
            `##PLUGIN_MOUNT##` will be substituted into
            `usr-lib{64}-resourced-plugins.mount` (depending on the architecture)
            which bind mounts resourced plugins subdirectory allowing it to be
            replaced with the ones provided by the ISU package
            `etc-resourced.mount` which is responsible for replacing /etc/resourced
            with the one provided by ISU
    [files] section:
        contains a list of files/directories that should be added to the ISU package.
        We provide 3 mandatory entries here:
            /usr/bin/resourced - resourced binary
            /etc/resourced - directory containing resourced configuration
            libresourced-private-api.so.* - library that is mandatory for resourced
            resourced/plugins - directory with resourced plugins (optional)
        We use the `##LIBDIR##` snippet to obtain the proper library path (explained
        later).
* isu/resourced.service- modified ISU service file.
    Comparing to the original service file, dependency on plugin mount unit has been
    introduced. Plugin mount unit in turns is dependent on the `etc-resourced` mount
    unit. Also, the ExecStart has been modified so that it loads the service binary
    from the ISU package path rather than the original one (/usr/bin/resourced).
* isu/etc-resourced.mount - mount unit responsible for replacing the original
    /etc/resourced directory with the one provided by the ISU package
* isu/usr-lib-resourced-plugins.mount - mount unit responsible for replacing plugins
    subdirectory with the one provided by the ISU package.
    ##PLUGIN_LIB_DIR## is substituted by the appropriate string generated in the
    resourced.spec file, which depends on the architecture: on 32-bit systems it will
    be /usr/lib, and on 64-bit ones /usr/lib64. This mount unit may be renamed later
    to `usr-lib64-resourced-plugins.mount` as the name of the mount unit must reflect
    the path to which it applies a bind mount. This is done in the isu/CMakeLists.txt.
* packaging/resourced.spec - main resourced RPM spec file.
    The following changes has been made:
    - added isu package, its description, and isu configuration files section
    - added ISU_ARCH_BIT constant to be passed to the cmake invocation, so that it
      knows for which architecture the build was invoked
    - added `##LIBDIR##`, `##PLUGIN_LIB_DIR## ` and `##PLUGIN_MOUNT##` symbols
      expansion to substitute the placeholders in isu configuration, service file and
      mount unit files depending on the architecture:
      ##LIBDIR## exapnds to /usr/lib{64}
      ##PLUGIN_MOUNT## expands to usr-lib{64}-resourced-plugins.mount
      ##PLUGIN_LIB_DIR## expands to /usr/lib{64}/resourced/plugins
    - added packaing plugins directory to the `bin` rpm package. This is needed to
      prevent plugins mount unit from failing when the plugins are not present (they
      are optional).
* isu/CMakeLists.txt - CMake config file for the ISU rpm package
    Added installing ISU config file, isu service file and mount units to the
    appropriate locations (/etc/isu/*). Also added renaming plugins mount unit file
    to the appropriate one (depending on the architecture).
* src/CMakeLists.txt - main CMake config file
    Added creating resourced plugins directory unconditionally. Necessary for the
    spec file to be able to package plugins directory (possibly empty) into the `bin`
    rpm package.

Change-Id: I94822c90da0c3ad8e61407f8e4a994a7840b2adb

11 months agolowmem-limit: Update app (w/ MemLimitAction) cgroup when status is changed 95/302195/1 accepted/tizen/7.0/unified/20231205.172636
Unsung Lee [Sun, 3 Dec 2023 10:53:59 +0000 (19:53 +0900)]
lowmem-limit: Update app (w/ MemLimitAction) cgroup when status is changed

Update memory cgroup of MemLimitAction defined app when status is changed.

Change-Id: Ia1211b1c1982c25e8adf7910cee894bfb98a6cf7
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
11 months agocpu-sched: Exclude apps that are not foreground but have PROC_STATE_FOREGROUND state 04/302104/2 accepted/tizen/7.0/unified/20231201.133109 accepted/tizen/7.0/unified/20231201.180605
Unsung Lee [Thu, 30 Nov 2023 08:19:12 +0000 (17:19 +0900)]
cpu-sched: Exclude apps that are not foreground but have PROC_STATE_FOREGROUND state

Exclude apps that are not foreground but have PROC_STATE_FOREGROUND state from
foreground cpu affinity group. cpu-sched module initially searches already
launched foreground app and move them to foreground cpu affinity grouop.

Change-Id: I3692d6a4e70c08babc5547326133099ac20ebf91
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
11 months agocpu-sched: Add background notifiers for fixed oom score app 78/301878/3
Unsung Lee [Sun, 26 Nov 2023 11:07:59 +0000 (20:07 +0900)]
cpu-sched: Add background notifiers for fixed oom score app

Add background notifiers for fixed oom score app. This is because,
ForegroundApps fixs cpu affinity for foreground app, but fixed oom score app
was excluded from cpu affinity update.

newly added notifiers are like below:
  - RESOURCED_NOTIFIER_APP_BACKGRD_WITH_FIXED_OOM_SCORE for background status

Change-Id: I737c568c3bd18bc8fe436df16e8bcc370c6abf71
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
11 months agocpu-sched: Check name and cpu_info for app with cpu affinity 77/301877/2
Unsung Lee [Sun, 26 Nov 2023 10:28:53 +0000 (19:28 +0900)]
cpu-sched: Check name and cpu_info for app with cpu affinity

App with cpu affinity has non Null name and cpu_info, but
app without cpu affinity has Null name and cpu_info. Therefore,
name and cpu_info must be checked to judge whehter cpu affinity is
statically fixed at app.

Change-Id: I53693fe769c6a0ffe033fd49b700e44a6f0d3d92
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
11 months agomemory-cgroup: Set oom score range between cgroup 42/302042/2 accepted/tizen/7.0/unified/20231130.182425
Unsung Lee [Wed, 29 Nov 2023 11:52:11 +0000 (20:52 +0900)]
memory-cgroup: Set oom score range between cgroup

Set oom score range between cgroup. In this case,
only perceptible and favorite apps can be moved between memory cgroups
when the memory limit is set.

Change-Id: I5cc350c3c18350c9f8c047c8fd6e0043bdfdc642
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
11 months agoproc-main: Revert update oom score of service app launch 41/302041/1
Unsung Lee [Thu, 30 Nov 2023 02:33:08 +0000 (11:33 +0900)]
proc-main: Revert update oom score of service app launch

Revert update oom score when service app is launched. It is process
to revert functionality of resourced 6.0.

Change-Id: I3de83bdf43fc906d899d97d9037c359ea06b2c9a
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
11 months agoconf: Support memory limit exception for specific app 21/301921/3 accepted/tizen/7.0/unified/20231128.175759
Unsung Lee [Mon, 27 Nov 2023 07:53:48 +0000 (16:53 +0900)]
conf: Support memory limit exception for specific app

Support memory limit exception for specific app if <limit> value is -1.
This functionality is required to exclude specific app from
ServicePerAppLimitAction, WidgetPerAppLimitAction, GUIPerAppLimitAction, and
BackgroundPerAppLimitAction.

Change-Id: Ia58c4538ca541b78adc61a32d870730063915c6f
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
11 months agoconf: Remove action from all LimitAction 10/301910/4
Unsung Lee [Mon, 27 Nov 2023 04:47:28 +0000 (13:47 +0900)]
conf: Remove action from all LimitAction

Remove action from all LimitAction confs
(i.e., ServicePerAppLimitAction, WidgetPerAppLimitAction, GUIPerAppLimitAction,
BackgroundPerAppLimitAction and MemLimitAction).
Action will be decided only by MemoryLimitTrigger conf.

Change-Id: Ieae8ed65d8d55b6a6e70e21fc1024bfaf09664f3
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
11 months agolowmem: Restore default value of LmkThresholdLeave and LmkMaxVictimPerOom 83/301683/1 accepted/tizen/7.0/unified/20231122.175032
Unsung Lee [Tue, 21 Nov 2023 11:42:41 +0000 (20:42 +0900)]
lowmem: Restore default value of LmkThresholdLeave and LmkMaxVictimPerOom

Set default value of LmkThresholdLeave and LmkMaxVictimPerOom as before
of commit 3b936616d4a2b9e4058ff191c396aebc5f5efc57

Change-Id: I487117ca976b9ab57240385f889f992b67faec75
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
11 months agoconf: Add LmkMaxVictimPerOom to set max victim per oom level during LMK 82/301682/1
Unsung Lee [Fri, 17 Nov 2023 11:29:00 +0000 (20:29 +0900)]
conf: Add LmkMaxVictimPerOom to set max victim per oom level during LMK

Add LmkMaxVictimPerOom to set max victim per oom level during LMK.
It is restoration of 'NumMaxVictims' in tizen 6.0.

Change-Id: I3771d00e1d3f847072039e553d9f8ce3aae1146a
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
11 months agoprocess: Fix watchdog handler to use proper appid
SangYoun Kwak [Fri, 17 Nov 2023 02:23:57 +0000 (11:23 +0900)]
process: Fix watchdog handler to use proper appid

The watchdog handler handles dbus signal(with a pid as a parameter) and
kills an app of this pid if its watchdog action is not configured as
"ignore".  (Watchdog action can be configured by locating proper .conf
file in /etc/resourced/process.conf.d.)

Previously, the watchdog handler uses /proc/<pid>/cmdline as an app
name, which is not an actual app name. This caused the watchdog handler
to think 'this app is not configured as "ignore"' even it is configured
as "ignore" because the actual app name and /proc/<pid>/cmdline are not
matched.
Thus, apps which should be not killed by the watchdog were killed.

To fix this issue, find_app_info() is used, which gets
struct proc_app_info from pid, to get the proper app name.

Change-Id: I2bc9c9d7ffcb45bbc10243241d4786fb73d2f7b4
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
11 months agoconf: Add LmkThresholdLeave to set stop condition of LMK
Unsung Lee [Fri, 17 Nov 2023 06:28:21 +0000 (15:28 +0900)]
conf: Add LmkThresholdLeave to set stop condition of LMK

Add LmkThresholdLeave to set stop condition of LMK.
It is restoration of 'ThresholdLeave' in tizen 6.0.

Change-Id: I0fb27492d8aae4ae0807fd65e98560c025e6c057
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
11 months agoproc-oom-priority: Support fixed oom for service type app 58/301558/3
Unsung Lee [Fri, 17 Nov 2023 06:17:10 +0000 (15:17 +0900)]
proc-oom-priority: Support fixed oom for service type app

Change-Id: Ia8c3dfa1f973f44948f6b11cc9a223302505b951
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
11 months agolowmem-governor: Remove app with LmkKillException from the LMK victim list 30/301330/6
Unsung Lee [Fri, 10 Nov 2023 07:46:29 +0000 (16:46 +0900)]
lowmem-governor: Remove app with LmkKillException from the LMK victim list

Remove app with LmkKillException configuration property (yes|1|ok|on|)
from the LMK victim list during LMK. If LmkKillException is not declared in
limiter.conf.d, then the process can be included in LMK victim list during LMK
(default is no|0|off).

Change-Id: I8aa5903850438952a6f2f9e024eba1bb4f7ccd43
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
11 months agoconf: Add LmkKillException to remove app from LMK list 29/301329/6
Unsung Lee [Thu, 9 Nov 2023 11:37:01 +0000 (20:37 +0900)]
conf: Add LmkKillException to remove app from LMK list

Change-Id: I3cd92aa109185a2dbab2171230681e3ec9cf75b3
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
11 months agoproc-common: Change limit_bytes type to cover larger than 4GB 28/301328/5
Unsung Lee [Thu, 9 Nov 2023 07:55:21 +0000 (16:55 +0900)]
proc-common: Change limit_bytes type to cover larger than 4GB

Change limit_bytes type from unsigned long to uint64_t
to cover more than 4GB in 32bit machine.

Change-Id: I48405ad16066f21a5c569f7eab181ef2d2ef2a14
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
11 months agolowmem-limit: Remove useless max limit size check 27/301327/5
Unsung Lee [Thu, 9 Nov 2023 07:37:23 +0000 (16:37 +0900)]
lowmem-limit: Remove useless max limit size check

Resourced already resizes limit size when limit size is larger than total memory size.

Change-Id: I71cf191f07c398e1916bbe6d1397874e7f6df302
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
11 months agolowmem-limit: Add oom based event trigger and handler 26/301326/5
Unsung Lee [Wed, 8 Nov 2023 12:21:52 +0000 (21:21 +0900)]
lowmem-limit: Add oom based event trigger and handler

Add oom based event trigger and handler to restore 'MemLimitTrigger=oom' in tizen 6.0.
If memory limit is triggered by oom instead of threshold, then do NOT kill or
reclaim forcely in the resourced (Kernel's oom job).

Change-Id: I3c00412ddac9e89080aee3a2b8bfa5297ef7e5d9
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
11 months agoconf: Support oom based event trigger and handler in conf 25/301325/3
Unsung Lee [Thu, 9 Nov 2023 01:12:03 +0000 (10:12 +0900)]
conf: Support oom based event trigger and handler in conf

Add 'MemoryLimitTrigger' conf to support oom based event trigger and handler.
If conf value is oom then, memory limit is handled by kernel oom. On the other hand,
reosurced handles memory limit directly with threshold value in the conf.

Change-Id: I785fc8bdac9505f990dc48cf3c4c7d4ead013c01
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
14 months agolowmem: Remove uninitialized variable reference 29/297929/1 accepted/tizen/7.0/unified/20230830.171816
Unsung Lee [Tue, 29 Aug 2023 01:24:28 +0000 (10:24 +0900)]
lowmem: Remove uninitialized variable reference

Remove unintialized variable reference to solve
the problem reported by static analyzer.

This one solves the Coverity issue with cid 1706223.

Change-Id: I91189d277f85e2cd9e0681e652a497e6d27fc596
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
15 months agoswap: Reclaim memory when LCD is off 07/297407/2 accepted/tizen/7.0/unified/20230821.170212
Unsung Lee [Thu, 17 Aug 2023 05:34:57 +0000 (14:34 +0900)]
swap: Reclaim memory when LCD is off

Reclaim memory from BackgroundMru memory cgroup when LCD is off
to reserve memory.

This is one of patch to restore BackgroundReclaim configuration of resourced 6.0.

Change-Id: I3657689a11931f8f80deeaaebc64fcdc4dc35747
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
15 months agomemory-cgroup: Add BackgroundMru cgroup 06/297406/1
Unsung Lee [Thu, 17 Aug 2023 08:33:22 +0000 (17:33 +0900)]
memory-cgroup: Add BackgroundMru cgroup

Add a memory cgroup called BackgroundMru to include apps
which have oom_score_adj like below range.
OOMADJ_BACKGRD_PERCEPTIBLE <= oom_score_adj
< OOMADJ_BACKGRD_UNLOCKED + OOMADJ_APP_INCREASE

resourced allows process migration from Private to BackgroundMru and vice versa.
However, it is impossible to be migrated from Private to / (top) or BackgroundLru
and vice versa.

This is one of patch to restore BackgroundReclaim configuration of resourced 6.0.

Change-Id: Icd540641b65e75e87fd73ee3511f7b3c33c32957
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
15 months agomemory-cgroup: Rename memory throttling to memory background LRU 05/297405/1
Unsung Lee [Thu, 17 Aug 2023 06:31:49 +0000 (15:31 +0900)]
memory-cgroup: Rename memory throttling to memory background LRU

Rename memory throttling to memory background LRU to emphasize the meaning
of the corresponding memory cgroup.

This is one of patch to restore BackgroundReclaim configuration of resourced 6.0.

Change-Id: I7f7243d40cc1a1c9e4762bea2176d4abbbe62b1c
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
15 months agoconfig: Add AfterScreenDim configuration 04/297404/1
Unsung Lee [Thu, 17 Aug 2023 04:39:04 +0000 (13:39 +0900)]
config: Add AfterScreenDim configuration

Add AfterScreenDim configuration of MemoryBackgroundReclaim section
in optimizer.conf to reclaim memory from most recently used background apps.

This is one of patch to restore BackgroundReclaim configuration of resourced 6.0.

Change-Id: I30fbb0814c3622ea1d4615f8e3b424a4c105ace7
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
19 months agoRename plugins according to conf/resource/module 96/291596/2 accepted/tizen/7.0/unified/20230424.020452
Unsung Lee [Wed, 19 Apr 2023 04:53:27 +0000 (13:53 +0900)]
Rename plugins according to conf/resource/module

Renaming plugins in resourced-*.rpm package considering conf, resource, and module.
Plugin library name normally follows the rule below:
libplugin-resourced-<conf>-<resource>-<module>.so

conf: 'limiter' or 'optimizer' or 'monitor' or ''
resource: 'cpu' or 'memory' or ''

Change-Id: I14512fc0bb5f4a36a2a64a0b7f6c9da9e4e0bf46
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
19 months agooptimizer.conf: Change CPU RT throttling from 90% to 95% 35/290535/2 accepted/tizen/7.0/unified/20230330.014300
Unsung Lee [Tue, 28 Mar 2023 08:17:03 +0000 (17:17 +0900)]
optimizer.conf: Change CPU RT throttling from 90% to 95%

This patch includes
  - modification of CPU RT runtime

Increase the value from 90% to 95% to avoid throttling issue.

Change-Id: Ie80f32191a428b03e86606eb851ec5e9fb5ac836
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
21 months agoprocess: Support fixed oom for app via Private config 66/288466/1 accepted/tizen/7.0/unified/20230221.020447
Unsung Lee [Thu, 16 Feb 2023 06:39:01 +0000 (15:39 +0900)]
process: Support fixed oom for app via Private config

This patch includes
  - Parsing config from Private Section (config-parser.c/h)
  - Elimination of old style fixed oom config (proc.conf, README)
  - Replacement of oom_fixed_app_list using fixed_app_list
    (a.k.a. an hashtable which manages all apps in the Private Section)

Difference between old style fixed oom config and the current one
  - old style: Add app name directly in the common configuration file
  - the current style: Add app name in the Private Section (xxx.conf.d/yyy.conf)
    That is, any developer can add new configurations with making
private conf files.

Change-Id: I21abd58002ce48ce66ff203bececa7d573443a39
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
21 months agocpu-sched: Fix memory leak when loading the cpu affinity config 17/288417/1
Unsung Lee [Thu, 16 Feb 2023 06:15:18 +0000 (15:15 +0900)]
cpu-sched: Fix memory leak when loading the cpu affinity config

'name' value will not be freed when 'name' string is different from
'ForegroundApps' (return without free issue)

Change-Id: I5a2ef92944f16f518e40acb9d43285d9df3db1c6
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
21 months agocpu-sched: Optimize search for cpu affinity fixed app 16/288416/1
Unsung Lee [Mon, 13 Feb 2023 06:11:30 +0000 (15:11 +0900)]
cpu-sched: Optimize search for cpu affinity fixed app

This patch includes
  - Change serach for fixed cpu affnity apps
(using the hashtable of apps by calling
'fixed_app_and_service_exist_check(name, APP_TYPE) func')

resourced manages all per-app configurations
('Private' section) using a hashtable.
On the other hand, resourced (cpu-sched) managed cpu affinity fixed apps
using a list instead of hashtable.
That is, when resourced (cpu-sched) detects app launch or app status change,
it searches the list linearly to know whether the app requires fixed cpu affinity or not.
(Linear search is normally slow when app list size is big)

resourced (cpu-shced) will
  - use the hastable of the per-app configuration when searching an app
  - use the legacy list to apply something to all fixed cpu affinity apps

Change-Id: I8bdd2e94c718c47912a2209fcdb78087815b3b10
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
21 months agocpu-sched: Support cpu affinity pinning for App 15/288415/1
Unsung Lee [Thu, 9 Feb 2023 02:32:19 +0000 (11:32 +0900)]
cpu-sched: Support cpu affinity pinning for App

This patch includes:
  - Parse configuration(s) of per app cpu affinity (config-parser.c/h)
  - Update of README to reflect per App cpu affinity (README)
  - Register cpu affinity fixed app in the list (cpu-sched.c)
  - Read /sys/devices/system/cpu/online to know onlie cpuset and
reflect the current online cpuset info to cpuset cgroup

Per app cpu affinity pinning is different from foreground cpu affinity
  - foreground cpu affinity: pinning cpu affinity for foreground status apps
    * foreground app status detect -> pinning cpu affinity
  - per App cpu affinity: pinning cpu affinity for fixed apps
  regardless of app status
* app launch detect -> pinning cpu affinity

Change-Id: I80cec1032075f00d38d626dd7c4931eb51e35ad2
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
21 months agocpu-sched: Refactor common cpu affinity code 14/288414/1
Unsung Lee [Tue, 7 Feb 2023 07:00:18 +0000 (16:00 +0900)]
cpu-sched: Refactor common cpu affinity code

This patch includes
  - Refactoring of cpu-sched related code
    * 'cpu_sched_parse_cpuset' and 'cpu_shced_new_core' functions are moved
  from cpu-sched.c to config-parser.c/h
    * Cpu common data structure (i.e., 'coreset' and 'core') is moved
  from cpu-sched.c to cpu-common.h
    * Comments are modified
  - Renaming variable
    * Data structure: 'core' -> 'cpu_info' and 'coreset' -> 'cpuset_info'
    * Element: 'id' -> 'cpu_id' and 'on' -> 'online'
    * Other: minor change (such as local variable)

Change-Id: I757ba66b5ae6c12967a00965fce8e7d98f9eee23
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
21 months agolowmem-controller: Split up lowmem-controller feature from lowmem module 41/288241/1 accepted/tizen/7.0/unified/20230216.140322
SangYoun Kwak [Wed, 1 Feb 2023 09:10:41 +0000 (18:10 +0900)]
lowmem-controller: Split up lowmem-controller feature from lowmem module

The lowmem-controller.c was created by extracting the killing-process
feature from lowmem.c.
    * Newly created: lowmem-controller.c, lowmem-controller.h
    * "lowmem_controller_kill_candidates" function of
      lowmem-controller.c kills procs/apps from candidates list provided
      by the core(lowmem.c).
    * Symbols used only in lowmem-controller.c were moved from lowmem.c
      to lowmem-controller.c.
    * Symbols used both lowmem.c and lowmem-controller.c were moved from
      lowmem.c to lowmem.h.

Change-Id: I8bd0f65acc9df771385c1839096f1283424ce2a5
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
21 months agolowmem-monitor: Split up lowmem-monitor feature from lowmem module 40/288240/1
SangYoun Kwak [Wed, 1 Feb 2023 05:27:53 +0000 (14:27 +0900)]
lowmem-monitor: Split up lowmem-monitor feature from lowmem module

The lowmem-monitor.c was created by extracting the monitor feature from
lowmem.c. (The handler of lowmem pressure)
    * Newly created: lowmem-monitor.c, lowmem-monitor.h
    * "lowmem_monitor_pressure_initialize" function of
      lowmem-monitor.c initializes the handler for lowmem pressure.
    * Symbols used only in lowmem-monitor.c were moved from lowmem.c to
      lowmem-monitor.c.
    * The functions used in both lowmem-monitor.c and lowmem.c remain in
      lowmem.c and were changed to 'non-static' functions.

Change-Id: I26bad0c629b74e8261393d4f7a1d5ce60a9215ab
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
21 months agolowmem: Split up governor from lowmem module 39/288239/1
SangYoun Kwak [Mon, 9 Jan 2023 08:28:23 +0000 (17:28 +0900)]
lowmem: Split up governor from lowmem module

The lowmem-governor.c was created by extracting the
"sorting out kill candidate" functionality from lowmem.c.
    * Newly created: lowmem-governor.c, lowmem-governor.h
    * "lowmem_governor_get_kill_candidates" function from
      lowmem-governor.c gets a list of procs/apps and returns a sorted
      list of kill candidates.
    * Functions that only used in lowmem-governor.c were moved into
      lowmem-governor.c from lowmem.c.

Change-Id: Ieba1612c040a9891e2f87f44e6bd1a34251f05ea
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
21 months agoprocess: Add proc.conf to config rpm 62/287462/2 accepted/tizen/7.0/unified/20230131.073555
SangYoun Kwak [Mon, 30 Jan 2023 05:44:34 +0000 (14:44 +0900)]
process: Add proc.conf to config rpm

"proc.conf" file was added to config rpm, which means "proc.conf" file
can be installed when the platform image is created.

Change-Id: Ided05b12fe05b7e8efd0d36d3951b220b07c486b
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
21 months agoresource-limiter: Remove unused include 70/287370/1 accepted/tizen/7.0/unified/20230130.152645
SangYoun Kwak [Fri, 27 Jan 2023 04:49:49 +0000 (13:49 +0900)]
resource-limiter: Remove unused include

The "file-helper.h" was not used but included in the source code of
lowmem module.

Change-Id: I1d5149b415cb48d6dd43f8c6c02c1b058aa83322
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
21 months agoresource-monitor: Remove unused includes
SangYoun Kwak [Fri, 27 Jan 2023 02:20:47 +0000 (11:20 +0900)]
resource-monitor: Remove unused includes

Some unused includings in the source file of resource-monitor were
removed.

Change-Id: I2584f083cf00482d3eef121afe6006f13112618b
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
(cherry picked from commit ede5cbb948892c9c406accafbac784829b0e0f3d)

21 months agoprocess: Remove unused includes
SangYoun Kwak [Fri, 27 Jan 2023 02:14:44 +0000 (11:14 +0900)]
process: Remove unused includes

Some unused includings in the source files of process were removed.

Change-Id: I411e9486b941b533ef057fdfde3aad1294c7a916
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
(cherry picked from commit a424cc09db52c91b3b44171a247ff05b3c493d53)

21 months agoresourced: Remove unused includes
SangYoun Kwak [Fri, 27 Jan 2023 02:09:08 +0000 (11:09 +0900)]
resourced: Remove unused includes

Some unused includings in the source file of resourced were removed.

Change-Id: Ica3cba7d8cf8a6bc7408d9403562d6d8ed82c06f
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
(cherry picked from commit d2453574fe64b05f75b583c65e9b09c08fad6189)

21 months agoresource-optimizer: Remove unused includes
SangYoun Kwak [Fri, 27 Jan 2023 02:04:02 +0000 (11:04 +0900)]
resource-optimizer: Remove unused includes

Some unused includings in the source files of resource-optimizer were
removed.

Change-Id: Ice4dbd8fac7e6559ccde9ea3d0b4a6ae97462ab5
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
(cherry picked from commit 72d3e4f50016accfce996e3226e884af11d81050)

21 months agocommon: Remove unused includes
SangYoun Kwak [Thu, 26 Jan 2023 08:11:59 +0000 (17:11 +0900)]
common: Remove unused includes

Some unused includings in the source files of common were removed.

Change-Id: I360fbf1c3a281b3697b3be03445100cc009e2460
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
(cherry picked from commit ff1be3744e6307224a0506c7ef605bc3ecf95f6f)

21 months agoresource-limiter: Remove unused includes
SangYoun Kwak [Thu, 26 Jan 2023 07:57:57 +0000 (16:57 +0900)]
resource-limiter: Remove unused includes

Some unused includings in the source files of resource-limiter were
removed.

Change-Id: I2f6eb221db364d6cda1af785dfe1a0315d6a207e
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
(cherry picked from commit 79da907cf01bee2dd9a8132e61f551eb65f52f9c)

21 months agotests: Remove unused includes 74/287274/1
SangYoun Kwak [Thu, 26 Jan 2023 04:53:57 +0000 (13:53 +0900)]
tests: Remove unused includes

Some unused includings in the source file were removed.

Change-Id: I350cab33dca8c21814037d98492c24043788b499
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
21 months agoprocess: Restore OOM_FIXED_APPS 57/287257/1 accepted/tizen/7.0/unified/20230126.170235
SangYoun Kwak [Thu, 19 Jan 2023 03:25:55 +0000 (12:25 +0900)]
process: Restore OOM_FIXED_APPS

The OOM_FIXED_APPS feature fixes the oom score of some applications
specified specified in the proc.conf file.

This feature was removed as follows(reverse chronological order):
    f6c9aab ("Support old style vip cgroup")
    ad81bd2 ("Rearrange memory cgroup")
    740d0f5 ("Rearrange optimizer configuration")
    f2b65a3 ("Update limiter.conf and support realtime")
    a3344a9 ("Support per app(service) management")
    574bf1b ("Add 'PerProcess' configurations")
    36a18bf ("Modify comments & remove useless things")

This feature has been restored by request.

Change-Id: I155a31722f1b5cae446663f690234faee0babe2c
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
(cherry picked from commit abbc76cd9b1ce438fae07c5ae08b234a90ef24a1)

22 months agoSplit header file of 'lowmem' module 04/286504/1 accepted/tizen/7.0/unified/20230111.015120
SangYoun Kwak [Mon, 9 Jan 2023 03:02:47 +0000 (12:02 +0900)]
Split header file of 'lowmem' module

'lowmem.h' was split into 4 files:
    lowmem.h (lowmem.c)
    lowmem-dbus.h (lowmem-dbus.c)
    lowmem-limit.h (lowmem-limit.c)
    lowmem-system.h (lowmem-system.c)
Each header file is a header of its .c file.

As the 'lowmem.h' was split, source files containing
'lowmem.h' were modified.

Change-Id: Ic6ff839bbfd7e83df2558356deec5ed4534ae3fe
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
22 months agoFix the file names of the module 'lowmem' 03/286503/1
SangYoun Kwak [Mon, 9 Jan 2023 02:29:40 +0000 (11:29 +0900)]
Fix the file names of the module 'lowmem'

The header and source files of 'lowmem' were fixed:
    src/resource-limiter/memory/vmpressure-lowmem-handler.c
        -> src/resource-limiter/memory/lowmem.c
    src/resource-limiter/memory/lowmem-handler.h
        -> src/resource-limiter/memory/lowmem.h
As the header(lowmem.h) was renamed, source files
containing 'lowmem-handler.h' were modified.
(#include 'lowmem-handler.h' -> #include 'lowmem.h')
    src/process/proc-main.c
    src/resource-limiter/memory/lowmem-dbus.c
    src/resource-limiter/memory/lowmem-limit.c
    src/resource-limiter/memory/lowmem-system.c
    src/resource-optimizer/memory/swap/fileswap.c
    src/resource-optimizer/memory/swap/zramswap.c
    src/resource-optimizer/memory/swap/zswap.c

Change-Id: I9663719d96b0e86d100222b9692ea12423e42bc7
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
22 months agoRemove unnecessary '#include "lowmem-handler.h"' 02/286502/1
SangYoun Kwak [Mon, 9 Jan 2023 02:15:40 +0000 (11:15 +0900)]
Remove unnecessary '#include "lowmem-handler.h"'

In the files below, the "lowmem-handler.h" was included
but its symbols were never used.
    src/common/procfs/procfs.c
    src/process/proc-priority.c
    src/resource-optimizer/memory/dedup.c
    src/resource-optimizer/memory/swap/swap.c
    src/resourced/init.c
Thus, unnecessary includes were removed.

Change-Id: I96caef1ba08d7245cab2a51692063d4e760a2c10
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
22 months agoModify README of config files 55/286355/1 accepted/tizen/7.0/unified/20230110.032021
SangYoun Kwak [Wed, 4 Jan 2023 09:21:26 +0000 (18:21 +0900)]
Modify README of config files

The README of config files was renewed
because its content was out-dated.

Below are the changes:
1. Format
Now the key and value of the properties are described
separately.
For more accurate explanation, keys and values are described
using regular expression.

2. Contents were renewed about files below(config for common):
limiter.conf
optimizer.conf
monitor.conf
process.conf

3. Contents were added(config for each app):
limiter.conf.d/*.conf
optimizer.conf.d/*.conf
process.conf.d/*.conf
vip-process.d/*.conf

Change-Id: I585f6382b1ddff6d1458586a05b5fe92cf715b91
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
2 years agocpu-boosting: check return value of 'unlink' 97/282097/6 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.061541 accepted/tizen/7.0/unified/hotfix/20221116.105753 accepted/tizen/unified/20220928.020843 tizen_7.0_m2_release
Unsung Lee [Tue, 27 Sep 2022 04:48:12 +0000 (13:48 +0900)]
cpu-boosting: check return value of 'unlink'

Change-Id: Ia21839c980a252309546f6f9ea7fc588f57ec03c
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoMount watchdog cgroup early 84/282084/1
Unsung Lee [Tue, 27 Sep 2022 02:59:20 +0000 (11:59 +0900)]
Mount watchdog cgroup early

Change-Id: I3124c7a6fb97e98fa3fa11f30d765de741e199fa
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoTurn on heart-cpu for tct 02/281902/1 accepted/tizen/unified/20220927.132315
Unsung Lee [Fri, 23 Sep 2022 05:43:18 +0000 (14:43 +0900)]
Turn on heart-cpu for tct

Change-Id: Ifce9a9881194450320788a6d249bb0763e7c5925
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoFix Coverity reported bugs 40/280940/2 accepted/tizen/unified/20220908.124842
Unsung Lee [Wed, 7 Sep 2022 03:00:23 +0000 (12:00 +0900)]
Fix Coverity reported bugs

Change-Id: I18665f0d2e66ef94a05fc055d35c0cce8876d1ec
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoRename signal name 34/280934/1 accepted/tizen/unified/20220908.013426
Unsung Lee [Wed, 7 Sep 2022 02:17:49 +0000 (11:17 +0900)]
Rename signal name

Change-Id: I1e6fdd50c6894b74d843ba2e375253d36515a444
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoFix memory size of dest_process 90/280390/1 accepted/tizen/unified/20220902.020126 submit/tizen/20220901.095920
Unsung Lee [Mon, 29 Aug 2022 10:17:36 +0000 (19:17 +0900)]
Fix memory size of dest_process

Change-Id: Ibc27ad11c958ae000391381d6c90ed00106bb36f
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoIncrease MemLimit of resourced 56/280356/1
Unsung Lee [Mon, 29 Aug 2022 04:54:18 +0000 (13:54 +0900)]
Increase MemLimit of resourced

ASAN-enabled image requires more memory

Change-Id: I8ff8b2c628021865437344ff031a07d121c59c65
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoFix SVACE reported bugs 45/280345/1
Unsung Lee [Mon, 29 Aug 2022 01:35:45 +0000 (10:35 +0900)]
Fix SVACE reported bugs

Change-Id: Iffde2d9dcc0b5a76f28e1ac899f673f9417bf89c
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoFix Coverity reported bugs 72/280272/1
Unsung Lee [Fri, 26 Aug 2022 04:48:12 +0000 (13:48 +0900)]
Fix Coverity reported bugs

Change-Id: I639b29f936bf3b9bdf5bab7da71008336a4b7fd6
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoRearrange files and directories 04/279704/1 accepted/tizen/unified/20220824.135639 submit/tizen/20220822.111221
Unsung Lee [Tue, 16 Aug 2022 11:18:12 +0000 (20:18 +0900)]
Rearrange files and directories

Change-Id: I2fd8069de754a50f9c2f3094ac87dcd014d4b44a
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agocpu-boosting: add (un)register and get/set inherit 00/279500/6 submit/tizen/20220816.062425
Unsung Lee [Wed, 10 Aug 2022 09:01:03 +0000 (18:01 +0900)]
cpu-boosting: add (un)register and get/set inherit

Change-Id: I99fa6e6aba0ecd59b731b089245e63d4d3c156bd
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoFix SVACE reported bugs 67/278767/1
Unsung Lee [Tue, 26 Jul 2022 02:40:42 +0000 (11:40 +0900)]
Fix SVACE reported bugs

Change-Id: Ib1dd6764373e52fda332b7bdebbc55b5178e6045
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoRename flag -> flags 00/278600/2 accepted/tizen/unified/20220726.132018 submit/tizen/20220725.093537
Unsung Lee [Fri, 22 Jul 2022 08:02:28 +0000 (17:02 +0900)]
Rename flag -> flags

Change-Id: I85bd5311936f7e3feb0890a352d9a50c0a063867
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoDo not make backups for original policy, privilege 71/278571/2
Unsung Lee [Fri, 22 Jul 2022 06:01:34 +0000 (15:01 +0900)]
Do not make backups for original policy, privilege

Change-Id: Iba447a08455780d898718b709b8fb9dffba2a693
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoSupport CPU_BOOSTING_RESET_ON_FORK 59/278559/2 submit/tizen/20220722.040856
Unsung Lee [Fri, 22 Jul 2022 03:51:19 +0000 (12:51 +0900)]
Support CPU_BOOSTING_RESET_ON_FORK

Change-Id: Ic494e5bee8a082aa629af47c1af73d333c340c58
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoModify conf value 91/278291/1
Unsung Lee [Mon, 18 Jul 2022 11:43:54 +0000 (20:43 +0900)]
Modify conf value

Change-Id: I2a9ebb74f0f8580f0b6b554a7aa399db424ce59a
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoDelegate socket activation to a booster thread 19/277919/2 accepted/tizen/unified/20220719.131728 submit/tizen/20220718.101839
Unsung Lee [Fri, 15 Jul 2022 05:03:11 +0000 (14:03 +0900)]
Delegate socket activation to a booster thread

Change-Id: Ie9d2e928f60b8d1322f73697c459a8f74d80b22e
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoDeactivate exit-on-close and activate SIGTERM 77/277777/3
Unsung Lee [Wed, 13 Jul 2022 07:10:25 +0000 (16:10 +0900)]
Deactivate exit-on-close and activate SIGTERM

Change-Id: I8e56f20367dd71d06f1d2c11f05534cdb3349795
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agocpu-boosting: implement get func 15/277715/1
Unsung Lee [Tue, 12 Jul 2022 08:55:40 +0000 (17:55 +0900)]
cpu-boosting: implement get func

+ separate set and clear funcs

Change-Id: I320824c23092d5b4ae0eff23559ab1dbc38f098a
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoFix a bug referenced a dangling pointer 04/277704/1
Unsung Lee [Tue, 12 Jul 2022 08:00:37 +0000 (17:00 +0900)]
Fix a bug referenced a dangling pointer

Change-Id: I9db99145b0b07c077e86eb972d4a511f5288e203
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoFix Coverity reported bugs 71/277371/1 accepted/tizen/unified/20220706.120407 submit/tizen/20220706.042647
Unsung Lee [Wed, 6 Jul 2022 01:43:33 +0000 (10:43 +0900)]
Fix Coverity reported bugs

Change-Id: I775471ffdb69309113e245963260ddc747f57b5d
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoSupport old style vip cgroup 39/277339/6 submit/tizen/20220705.100432
Unsung Lee [Tue, 5 Jul 2022 08:39:15 +0000 (17:39 +0900)]
Support old style vip cgroup

+ add Process type of configuration

Change-Id: Idcc4b1a6da27160a9c164699006cabe17a72cdef
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoSkip send a reply for set and clear boosting 64/277064/1
Unsung Lee [Thu, 30 Jun 2022 05:18:37 +0000 (14:18 +0900)]
Skip send a reply for set and clear boosting

Change-Id: I771b1580acd309294e18e6f47eb613dd5d0e8eeb
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoModify optimizer.conf 58/277058/1
Unsung Lee [Thu, 30 Jun 2022 04:59:29 +0000 (13:59 +0900)]
Modify optimizer.conf

+ update /sys/fs/cgroup/cpu/cpu.rt_runtime_us and cpu.rt_period_us

Change-Id: Ia59d864ac980c39512b8b61971c966c304390f60
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoReference a cpu-boosting-private.h header file 97/276997/2
Unsung Lee [Wed, 29 Jun 2022 04:32:47 +0000 (13:32 +0900)]
Reference a cpu-boosting-private.h header file

Change-Id: If57326e36153a150b317c39eaa9c9e067a03e485
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoApply systemd socket activation for resourced 64/276964/7
Unsung Lee [Tue, 28 Jun 2022 11:05:49 +0000 (20:05 +0900)]
Apply systemd socket activation for resourced

+ implement socket-based cpu-boosting (set and clear)

Change-Id: Idb626bf48ab2a69747365fff8f75e5deec504af6
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoconf: enable heart battery for web tct 51/276951/1 accepted/tizen/unified/20220629.021820 submit/tizen/20220628.084224
Youngjae Cho [Tue, 28 Jun 2022 08:37:44 +0000 (17:37 +0900)]
conf: enable heart battery for web tct

Change-Id: Ieb32b117a56c2cdf4736bf55f57f3206af21d871
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agocpu-boosting: implement set and clear funcs 23/276523/4
Unsung Lee [Fri, 17 Jun 2022 10:29:01 +0000 (19:29 +0900)]
cpu-boosting: implement set and clear funcs

Change-Id: Id75c4da4be7e809399d41bdda5a2ead6893ffefb
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agocpu-boosting: parse CpuBoostingLevel conf 41/276341/7
Unsung Lee [Wed, 15 Jun 2022 04:05:09 +0000 (13:05 +0900)]
cpu-boosting: parse CpuBoostingLevel conf

Change-Id: I7f3accb4d20d1a51b172157510bcfcf8ef8b05a8
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoDelete the case where error(warn) logs are called 88/276288/3 accepted/tizen/unified/20220614.134540 submit/tizen/20220614.062403
Unsung Lee [Tue, 14 Jun 2022 05:17:38 +0000 (14:17 +0900)]
Delete the case where error(warn) logs are called

Change-Id: Iaad90b42ca761534221984b0bec7345f793c8067
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoswap: skip setting hard limit on top (memory) cgroup 32/276232/3 submit/tizen/20220614.014557
Unsung Lee [Mon, 13 Jun 2022 07:57:52 +0000 (16:57 +0900)]
swap: skip setting hard limit on top (memory) cgroup

Change-Id: I677458716c54a11fb6a1360976a4e32091828274
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoconf: update MemoryLevelThreshold, MemoryDedup, and MemoryCompaction 28/276228/2
Unsung Lee [Mon, 13 Jun 2022 07:25:01 +0000 (16:25 +0900)]
conf: update MemoryLevelThreshold, MemoryDedup, and MemoryCompaction

Change-Id: I24e08743e909a94b91dc1077f3a48fa1e1664d00
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoconf: apply CpuThrottling first and CpuSched next 23/276223/4
Unsung Lee [Mon, 13 Jun 2022 06:01:43 +0000 (15:01 +0900)]
conf: apply CpuThrottling first and CpuSched next

Change-Id: I74985dca4b44d2020420fbc364d48df1c523a7c3
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoRearrange memory cgroup 82/275982/5
Unsung Lee [Wed, 8 Jun 2022 05:10:19 +0000 (14:10 +0900)]
Rearrange memory cgroup

Change-Id: I8793e6bbb85f0f8dfc94be0980dd5c642c266742
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoRevert "Temporarily disable ServicePerAppLimitAction" 39/275439/2
Hyotaek Shim [Wed, 25 May 2022 02:01:27 +0000 (02:01 +0000)]
Revert "Temporarily disable ServicePerAppLimitAction"

This reverts commit a356c270c0e197007a51888c09ef730e8fb656bf.

Change-Id: I332e27e9dec68447eac91954d068194d34b78b05

2 years agoSupport resourced early boot 91/275291/4
Unsung Lee [Fri, 20 May 2022 01:43:54 +0000 (10:43 +0900)]
Support resourced early boot

Change-Id: I5140217ac049f65a81cd622cc23597caf34dfd22
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoSupport CPU throttling 50/275150/2
Unsung Lee [Mon, 16 May 2022 09:16:53 +0000 (18:16 +0900)]
Support CPU throttling

Change-Id: Icfa85a3228e9eaf0f94605561ac15f870d829641
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoRearrange optimizer configuration 72/275072/3
Unsung Lee [Mon, 16 May 2022 08:55:05 +0000 (17:55 +0900)]
Rearrange optimizer configuration

modify cpu cgroup code
modify optimizer (swap, dedup, compact) code

Change-Id: I1df1842fc410ab448ad7fe21654449082885de3a
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoMove cpu hotplug 68/275068/1
Unsung Lee [Mon, 16 May 2022 08:08:47 +0000 (17:08 +0900)]
Move cpu hotplug

from limiter to optimizer

Change-Id: I4d816c6890bb418fe0532e34f2fa3a88de9d5d33
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoRearrange cgroup (memory, cpu) 35/274935/5
Unsung Lee [Thu, 12 May 2022 08:07:26 +0000 (17:07 +0900)]
Rearrange cgroup (memory, cpu)

cpu: Throttling
memory: High-Medium-Lowest

Change-Id: I4eac7354b3e72200c9e8db0b125674f2fde21160
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoTemporarily disable ServicePerAppLimitAction 14/274814/1 accepted/tizen/unified/20220510.083209 submit/tizen/20220510.023853
Hyotaek Shim [Tue, 10 May 2022 02:30:05 +0000 (11:30 +0900)]
Temporarily disable ServicePerAppLimitAction

Change-Id: I6b8e9e7433e70173a29fd172e4ca3f36fef05e95
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
2 years agoFix bugs reported at Coverity 74/274574/6 accepted/tizen/unified/20220505.024713 submit/tizen/20220503.075052
Unsung Lee [Tue, 3 May 2022 01:25:11 +0000 (10:25 +0900)]
Fix bugs reported at Coverity

Change-Id: I53d75552aa0c0a580c816934de5952017999fbfe
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoFix bugs reported at SVACE 29/274529/5 accepted/tizen/unified/20220503.065026 submit/tizen/20220502.092616
Unsung Lee [Mon, 2 May 2022 02:15:13 +0000 (11:15 +0900)]
Fix bugs reported at SVACE

Change-Id: I588c3329a85139967e28224bcb346adec7a76ce6
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoFix a memory bug 13/274413/6 submit/tizen/20220428.053150
Unsung Lee [Thu, 28 Apr 2022 03:36:04 +0000 (12:36 +0900)]
Fix a memory bug

pass a pids_array pointer instead of memory_limit_event
structure argument to liveness_check_cb function

Change-Id: I79f48df22fa96129f89fc76f3460ae59a9366e32
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoRearrange configuration files & Modify the spec file 11/274311/3 submit/tizen/20220426.091404
Unsung Lee [Tue, 26 Apr 2022 03:23:47 +0000 (12:23 +0900)]
Rearrange configuration files & Modify the spec file

Change-Id: If5dbc07a1387c93d56a4ab76bf1dfbf3919127a8
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoAdd unit(in variable) & fix bugs 44/274144/5 submit/tizen/20220425.104329
Unsung Lee [Fri, 22 Apr 2022 05:47:56 +0000 (14:47 +0900)]
Add unit(in variable) & fix bugs

add unit in all variables (specially, time and memory)
fix incorrectly used units

Change-Id: I8eb1c29b6682e1f9c832e89b09320b31f881df8c
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoFix a bug(event handler) 86/273886/3
Unsung Lee [Fri, 15 Apr 2022 07:08:58 +0000 (16:08 +0900)]
Fix a bug(event handler)

remove useless cgroup event handlers

Change-Id: If369bee2e44514d65609eddfc4a7abfe0cd1e6e0
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoRemove useless source code 55/273755/2
Unsung Lee [Wed, 13 Apr 2022 08:50:58 +0000 (17:50 +0900)]
Remove useless source code

remove bgreclaim when lcd is turned off

Change-Id: If734d6975b18efeb53242a0e52000c29c4d069d3
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoUpdate submodule name in logs 91/273691/3
Unsung Lee [Tue, 12 Apr 2022 09:08:59 +0000 (18:08 +0900)]
Update submodule name in logs

Change-Id: I85875e3a30c45021d9b8337100a2881a1dc342f7
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoModify bugs on configuration 67/273667/7
Unsung Lee [Tue, 12 Apr 2022 01:35:19 +0000 (10:35 +0900)]
Modify bugs on configuration

Modify bugs on memory and cpu cgrups of per app or service
Update each configurations

Change-Id: Ide9810e1250b85d375b1881d9b087f0712d5ae45
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoUpdate limiter.conf and support realtime 89/273589/2
Unsung Lee [Fri, 8 Apr 2022 06:05:20 +0000 (15:05 +0900)]
Update limiter.conf and support realtime

Change-Id: Ic5a2200d2c0f6d03fe935e9ccdb19257c8894b34
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>