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)
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)
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)
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)
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)
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)
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>
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)
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Hyotaek Shim [Wed, 25 May 2022 02:01:27 +0000 (02:01 +0000)]
Revert "Temporarily disable ServicePerAppLimitAction"
This reverts commit
a356c270c0e197007a51888c09ef730e8fb656bf.
Change-Id: I332e27e9dec68447eac91954d068194d34b78b05
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Unsung Lee [Tue, 5 Apr 2022 05:01:29 +0000 (14:01 +0900)]
Add 'CpuSched' & Rearrange 'Swap' sections
parse and apply configurations in 'CpuSched' section
move a 'Swap' parser function to config-parser.c
Change-Id: Iec516cc9d7c2fa1019f69b676ebf197657c42439
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Mon, 4 Apr 2022 06:30:56 +0000 (15:30 +0900)]
Rearrange code and conf
move CpuAffinity from limiter to optimizer
rename section in optimizer.conf
Change-Id: I77cad6d01a0a2d78b43b8e9eb31eb5df7c3a93d7
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Wed, 30 Mar 2022 12:28:57 +0000 (21:28 +0900)]
Remove useless source code
remove useless code including indent
Change-Id: I5a96a373c462aee523ea072c66e2f2f78f5fd25d
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Wed, 30 Mar 2022 11:30:49 +0000 (20:30 +0900)]
Fix a bug & remove useless logs
fix an overflow bug
remove logs inserted for the test
Change-Id: I4e060ff0e4681ea6f7041eea02bd0c42e4414ffb
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Thu, 24 Mar 2022 03:05:59 +0000 (12:05 +0900)]
Implement configurations on optimizer.conf
Change-Id: I3c5dd1fcde82d579e5923e48cc885494809b2902
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Tue, 22 Mar 2022 10:58:08 +0000 (19:58 +0900)]
Parse a new style in optimizer.conf
Change-Id: I67d514d692a02e8927cb7df810f92698d0c8f7d2
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Tue, 22 Mar 2022 05:44:41 +0000 (14:44 +0900)]
Implement configurations on limiter.conf
Change-Id: I590d078f751869d75e75ae0359b67b4d284bb5b5
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Sat, 19 Mar 2022 07:06:39 +0000 (16:06 +0900)]
Parse a new style limiter.conf
Change-Id: If26c133d2372b097575002c2b4c90404e96b09d5
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Tue, 15 Mar 2022 11:09:58 +0000 (20:09 +0900)]
Rename memory state and rearrange code
Change-Id: I09961cc9ed126a79920a1688119ce1e245479a34
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Tue, 15 Mar 2022 07:32:51 +0000 (16:32 +0900)]
Enhance exception handling of memlimit
consider panic on oom case
Change-Id: Ie609129858b035b3e2a14a69d1ff834c1b1c3563
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Mon, 14 Mar 2022 11:44:07 +0000 (20:44 +0900)]
Update memory limit
send SIGTERM and SIGKILL after 2 seconds &
set memory.limit_in_bytes and memory.memsw.limit_in_bytes for safety
Change-Id: I188529ecc1587355716c2eac87ab787a1008d208
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Fri, 11 Mar 2022 03:08:31 +0000 (12:08 +0900)]
Support per app(service) management
Delete old style configuration &
Support per app(service) management
Change-Id: Iabfd9e3e7146f1ace575bf8ee0fd3c65e164961f
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Tue, 22 Feb 2022 05:20:36 +0000 (14:20 +0900)]
Add 'PerProcess' configurations
Change-Id: Ie03df4b237eeaf9bd445cbd0648fd00e58e144b5
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Mon, 21 Feb 2022 04:35:47 +0000 (13:35 +0900)]
Fix bugs reported on SVACE
Change-Id: Ibec54113306431ffe8d059d6fb4e22838c4c86b9
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Mon, 21 Feb 2022 03:57:57 +0000 (12:57 +0900)]
Parse 'PerProcess' section
Change-Id: If58a8ef63fc88acdb3a9e726068b6697304b7e0f
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Wed, 16 Feb 2022 12:22:54 +0000 (21:22 +0900)]
Modify comments & remove useless things
add proper tags in the comments
delete old style code and comments
Change-Id: Ia8aa4f61453c29327c4720cffc5046e4017efdb1
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Thu, 10 Feb 2022 11:42:40 +0000 (20:42 +0900)]
Rearrange vip and watchdog modules
vip module -> (proc-)watchdog module
proc-watchdog -> app-watchdog
Change-Id: I1d33ac2ae20c91537e10cbed8b81e95c5e957b96
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Thu, 10 Feb 2022 10:53:45 +0000 (19:53 +0900)]
Modify LMK policy
change oom_score_adj range and
use only one LMK policy to choose victims
Change-Id: I88befaf4dcf2e11682bbda9a1d45b619c8c0dde1
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Thu, 10 Feb 2022 10:44:46 +0000 (19:44 +0900)]
Fix bugs of "Modify configurations"
merge get_total_memory() and setup_memcg_params()
free vip_apps after printing logs
Change-Id: I8a63dfe4a84cd0a8eb050daff26e725016101795
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Fri, 4 Feb 2022 09:22:04 +0000 (18:22 +0900)]
Modify configurations
delete old style configuration files and create new configuration files
Change-Id: I11e0cf2d9856f41aea81675b880271d4abd16143
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Mon, 24 Jan 2022 04:00:26 +0000 (13:00 +0900)]
Classify apps & optimize memory cgroup
Classify apps according to oom_score_adj &
remove useless find_app_info() functions
Change-Id: Id7131dd11a36b16cc6b2b061cccc9aa842c51224
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Wed, 12 Jan 2022 11:18:57 +0000 (20:18 +0900)]
Modify configuration file name/path
Change-Id: I3b84a0961d379e127025762ee6b2a705ad14d031
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Mon, 10 Jan 2022 03:47:48 +0000 (12:47 +0900)]
Modify victim task size unit(MB->KB)
Change-Id: I87d0c6312817159821a24d8203146a5231fb7aa4
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Mon, 10 Jan 2022 03:38:31 +0000 (12:38 +0900)]
Modify swap size unit(bytes->mbytes)
Change-Id: I428240e773ddd001de4e8f1d318039a0da55116a
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Fri, 7 Jan 2022 06:12:39 +0000 (15:12 +0900)]
Modify cgroup structure
Modify memory cgroup hierarchy and memory cgroup structure
Add cgroup(common) structure
Change-Id: I4fb03e9e52ef700069ed0d3102d04b0d5cd59205
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Fri, 31 Dec 2021 06:22:30 +0000 (15:22 +0900)]
Modify CPU cgroup hierarchy
/sys/fs/cgroup/cpu/high/medium/low
/tizendocker
Change-Id: I67160165e21149353f0f3acda9048e214df1c8f2
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Tue, 28 Dec 2021 09:15:51 +0000 (18:15 +0900)]
Separate notifiers
Change-Id: Idb97d63a168a4026eb71c9d1b44977b09c2030bc
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Mon, 27 Dec 2021 09:59:17 +0000 (18:59 +0900)]
Refactor cgroup components
Collect all cgroup-related functions into the src/common/cgroup
Change-Id: I4ebc924baae5ace0b933360d8f12e96584a63c22
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Mateusz Majewski [Wed, 29 Dec 2021 13:14:42 +0000 (14:14 +0100)]
Fix some memory leaks
Issues reported by jm0508.kwon@samsung.com and
ravi.singh1@samsung.com. Thanks!
Change-Id: I9658a23bf9f0960f8b29167c0a28b80c995b706f
Co-authored-by: Ravi Singh <ravi.singh1@samsung.com>
Unsung Lee [Fri, 10 Dec 2021 10:17:42 +0000 (19:17 +0900)]
Fix convert_status_to_str
Change-Id: I7dd3389e9adbe12a2fb5028dca272ccf9282ab1e
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Thu, 9 Dec 2021 05:59:53 +0000 (14:59 +0900)]
Disable make_memps_log
Change-Id: I14cad87f047a119179251f91355043549147cbd8
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Unsung Lee [Wed, 8 Dec 2021 06:59:31 +0000 (15:59 +0900)]
Update LMK policy
Search victims from all LMK app groups in the first try.
Change-Id: I2ee8732e2276b5b375db1dbf0d3382b3547151ee
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Mateusz Majewski [Wed, 10 Nov 2021 14:01:08 +0000 (15:01 +0100)]
Rewire extern "C" blocks
This is needed in order not to #include "glib.h" in the extern "C"
blocks, which breaks in the newest GLib version.
Change-Id: Ia00fcb42434c1e70165dffe3bc1e9b1c57a78fe1
Youngjae Cho [Wed, 3 Nov 2021 08:27:07 +0000 (17:27 +0900)]
process: update oom_score_adj back to itself
In initializing service app, it initializes /proc/pid/oom_score_adj,
but cannot initialize the data structure itself within its subroutine.
Therefore manually update the oom_score_adj.
Change-Id: Ifc2a13a020dcd570d318c79e7e67d5f04ed41fc0
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Hubert Kowalski [Thu, 7 Oct 2021 13:11:15 +0000 (15:11 +0200)]
Revamp resourced directory hierarchy
Done in preparation for resourced's new
role as a centralized resource management
framework. Makes the organization more
modular, with clearer responsibility.
Change-Id: I432f83537a6ca9dcfce00172942ca1bb422f3cf1
Youngjae Cho [Thu, 2 Sep 2021 07:39:39 +0000 (16:39 +0900)]
vip-process: rework vip-agent
vip-process now constructs vip configurations from each vip packages,
not from resourced itself. Each vip packages now define and install
vip configuration file at /etc/resourced/vip-process.d, and resourced
collects these configuration files. The format of new configuration
file is like below, and more option might be added in the future.
[VIP_GROUP1] // Section format: VIP_GROUP#
There can be multiple vip groups.
If there is only one group, then just
[VIP_GROUP] is possible.
PROCESS=some_binary1 // Define vip processes.
PROCESS=some_binary2
...
SERVICE=some_unit1.service // Define vip services.
SERVICE=some_unit2.service
...
ACTION_ON_FAILURE=reboot // Define action for the vip group.
// Currently only "reboot" is supported.
[VIP_GROUP2]
...
Change-Id: I4d88f59a009a5a7800651a07f79ab37f2cfae719
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Hyotaek Shim [Wed, 1 Sep 2021 10:50:40 +0000 (19:50 +0900)]
Temporarily disable VIP reboot for enlightenment
Change-Id: I14051c258f4d2794fa1fd0cc7c7c0111013a27d2
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>