platform/core/system/resourced.git
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>
2 years agoAdd 'CpuSched' & Rearrange 'Swap' sections 72/273372/5
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>
2 years agoRearrange code and conf 23/273323/2
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>
2 years agoRemove useless source code 03/273103/2
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>
2 years agoFix a bug & remove useless logs 96/273096/1
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>
2 years agoImplement configurations on optimizer.conf 95/273095/1
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>
2 years agoParse a new style in optimizer.conf 94/273094/1
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>
2 years agoImplement configurations on limiter.conf 93/273093/1
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>
2 years agoParse a new style limiter.conf 92/273092/1
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>
2 years agoRename memory state and rearrange code 91/273091/1
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>
2 years agoEnhance exception handling of memlimit 56/272356/5
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>
2 years agoUpdate memory limit 16/272316/3
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>
2 years agoSupport per app(service) management 06/272206/6
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>
2 years agoAdd 'PerProcess' configurations 05/272205/1
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>
2 years agoFix bugs reported on SVACE 21/271421/7
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>
2 years agoParse 'PerProcess' section 16/271416/8
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>
2 years agoModify comments & remove useless things 80/271180/2
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>
2 years agoRearrange vip and watchdog modules 98/271098/3
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>
2 years agoModify LMK policy 97/271097/1
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>
2 years agoFix bugs of "Modify configurations" 77/270877/4
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>
2 years agoModify configurations 36/270636/8
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>
2 years agoClassify apps & optimize memory cgroup 67/270167/2
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>
2 years agoModify configuration file name/path 31/269331/3
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>
2 years agoModify victim task size unit(MB->KB) 18/269118/1
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>
2 years agoModify swap size unit(bytes->mbytes) 16/269116/1
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>
2 years agoModify cgroup structure 05/269105/2
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>
2 years agoModify CPU cgroup hierarchy 16/269016/9
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>
2 years agoSeparate notifiers 34/268634/5
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>
2 years agoRefactor cgroup components 53/268753/2
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>
2 years agoFix some memory leaks 84/268684/1 accepted/tizen/unified/20211231.161332 submit/tizen/20211230.110505
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>
2 years agoFix convert_status_to_str 40/267840/1
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>
2 years agoDisable make_memps_log 11/267711/1 accepted/tizen/unified/20211213.133408 submit/tizen/20211210.093152
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>
2 years agoUpdate LMK policy 47/267647/4
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>
3 years agoRewire extern "C" blocks 21/266321/2 accepted/tizen/unified/20211116.130508 submit/tizen/20211115.094018
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

3 years agoprocess: update oom_score_adj back to itself 87/265987/6
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>
3 years agoRevamp resourced directory hierarchy 90/265090/8 accepted/tizen/unified/20211105.130514 submit/tizen/20211029.132023 submit/tizen/20211103.072537 submit/tizen/20211104.031932 submit/tizen/20211104.080231
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

3 years agovip-process: rework vip-agent 41/263441/4 accepted/tizen/6.5/unified/20211028.115453 accepted/tizen/unified/20210914.084920 submit/tizen/20210913.042525 submit/tizen_6.5/20211028.162501 tizen_6.5.m2_release
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>
3 years agoTemporarily disable VIP reboot for enlightenment 75/263375/1 accepted/tizen/unified/20210901.114631 submit/tizen/20210901.105117
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>
3 years agovip-process: disable vip by boot parameter 59/262759/1 accepted/tizen/unified/20210824.123813 submit/tizen/20210819.082047
Youngjae Cho [Thu, 19 Aug 2021 07:30:45 +0000 (16:30 +0900)]
vip-process: disable vip by boot parameter

If boot parameter 'tizen.vip_reboot_disable' is given, disable
vip-process module.

Change-Id: I816bc60e8e7674d96fdf0ea0fd2f09fa3732b0e1
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agovip-process: print dlog in vip_print_console() 50/262550/2
Youngjae Cho [Fri, 13 Aug 2021 06:21:01 +0000 (15:21 +0900)]
vip-process: print dlog in vip_print_console()

Change-Id: I764b1ef75c76ab61e28044ee044f8a89a3f3499b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agoRemove unused mem-stress package 77/261777/1 accepted/tizen/unified/20210727.124406 submit/tizen/20210726.170601
Hyotaek Shim [Mon, 26 Jul 2021 07:41:15 +0000 (16:41 +0900)]
Remove unused mem-stress package

Change-Id: I11f8c744e4b92246ea7a4fd7b18180dca3096ea4
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
3 years agocpu: change udev buffer size from default value to 512 KB 89/261289/3 accepted/tizen/unified/20210727.124552 submit/tizen/20210726.050348
INSUN PYO [Wed, 14 Jul 2021 08:00:09 +0000 (17:00 +0900)]
cpu: change udev buffer size from default value to 512 KB

Between udev_monitor_enable_receiving() and the start of g_main_loop, a lot of udev events accumulate, and G_IO_ERR occurs in udev.

In vim3 target, many udev events occur when booting.
========================================================
KERNEL[3947.849435] add      /kernel/slab/:atA-0000192/cgroup/dentry(660:storaged.service) (cgroup)
KERNEL[3947.849544] add      /kernel/slab/inode_cache/cgroup/inode_cache(660:storaged.service) (cgroup)
KERNEL[3947.851730] add      /kernel/slab/sock_inode_cache/cgroup/sock_inode_cache(660:storaged.service) (cgroup)
KERNEL[3947.851822] add      /kernel/slab/:t-0000256/cgroup/kmalloc-256(660:storaged.service) (cgroup)
KERNEL[3947.851964] add      /kernel/slab/:t-0000512/cgroup/kmalloc-512(660:storaged.service) (cgroup)
KERNEL[3947.852916] add      /kernel/slab/:tA-0000192/cgroup/cred_jar(660:storaged.service) (cgroup)
KERNEL[3947.852971] add      /kernel/slab/:t-0000128/cgroup/kmalloc-128(660:storaged.service) (cgroup)
KERNEL[3947.853031] add      /kernel/slab/proc_inode_cache/cgroup/proc_inode_cache(660:storaged.service) (cgroup)
KERNEL[3947.853760] add      /kernel/slab/:tA-0000896/cgroup/mm_struct(660:storaged.service) (cgroup)
KERNEL[3947.853807] add      /kernel/slab/:tA-0000176/cgroup/vm_area_struct(660:storaged.service) (cgroup)
KERNEL[3947.853831] add      /kernel/slab/:tA-0000064/cgroup/anon_vma_chain(660:storaged.service) (cgroup)
KERNEL[3947.853848] add      /kernel/slab/anon_vma/cgroup/anon_vma(660:storaged.service) (cgroup)
==============================================================

Default value of udev buffer: /proc/sys/net/core/rmem_default (212992 byte on vim3 target)

Change-Id: I810a4f872b23e0f4b8e3ed8b68cdb5915ce1b0a3

3 years agoheart-battery: check battery feature before init 12/261112/2 accepted/tizen/unified/20210715.124008 submit/tizen/20210714.103132
Youngjae Cho [Mon, 12 Jul 2021 06:20:34 +0000 (15:20 +0900)]
heart-battery: check battery feature before init

Change-Id: Ib3c1453f77fbc9f66bd961d29d73774c75649d71
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agocommon: fix G_IO_ERR handling bug. 84/261184/8
INSUN PYO [Tue, 13 Jul 2021 03:30:01 +0000 (12:30 +0900)]
common: fix G_IO_ERR handling bug.

If "G_IO_IN | G_IO_ERR" occurs, function can not handle G_IO_IN.
As a result, G_IO_IN continues to trigger in the poll.

Change-Id: Iebb22830f71074aaed0fff93dab569854e4a6c71

3 years agoprocess: rename proc-stat to process 48/261048/2
Youngjae Cho [Fri, 9 Jul 2021 05:05:58 +0000 (14:05 +0900)]
process: rename proc-stat to process

Change-Id: I546adc6e84d0995450ef85f4f7e6e79a8b18ea14
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agomemory: add relative vmpressure threshold for iot-headless 87/260687/4
Youngjae Cho [Thu, 1 Jul 2021 05:09:24 +0000 (14:09 +0900)]
memory: add relative vmpressure threshold for iot-headless

resourced-headless have managed vmpressure based on ratio of available
memory to the total memory. Since resourced-headless has been replaced
with resourced, bring this functionality into resourced for iot-headless
profile.

Change-Id: I4683fce74d61417bb3052dd857a912be5058d614
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agovip-process: add config for headless profile 53/260553/6 accepted/tizen/unified/20210630.143921 submit/tizen/20210630.045241
Youngjae Cho [Tue, 29 Jun 2021 02:48:07 +0000 (11:48 +0900)]
vip-process: add config for headless profile

resourced-headless of iot-headless profile is replaced by resourced.

Change-Id: Ica83f027d0ffa040d84b8ec170c545eb959f007b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agoRename conf file for consistency 60/260560/2
Youngjae Cho [Tue, 29 Jun 2021 05:24:55 +0000 (14:24 +0900)]
Rename conf file for consistency

Change-Id: I37b3ffdad300b2902586615f93bef1657796df71
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agoRevert "Temporarily disable VIP reboot for dbus.service" 52/260252/1 accepted/tizen/unified/20210623.125304 submit/tizen/20210623.023127
Hyotaek Shim [Tue, 22 Jun 2021 12:07:25 +0000 (12:07 +0000)]
Revert "Temporarily disable VIP reboot for dbus.service"

This reverts commit b38f0b9812af44b5b97d7673b3e3b3e1407a4553.

Change-Id: I1a40ef122188003ac877bd4c908b0ca073d0a6fd

3 years agoTemporarily disable VIP reboot for dbus.service 93/260193/1 accepted/tizen/unified/20210622.045004 submit/tizen/20210622.020044
Hyotaek Shim [Tue, 22 Jun 2021 02:00:03 +0000 (11:00 +0900)]
Temporarily disable VIP reboot for dbus.service

Change-Id: Ifeefd4fc0d70455621bf93ca625bfec034427492
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
3 years agovip-process: print VIP fail log on console 14/259814/5 accepted/tizen/unified/20210616.132434 submit/tizen/20210616.024518 submit/tizen/20210616.025608
Youngjae Cho [Tue, 15 Jun 2021 06:26:00 +0000 (15:26 +0900)]
vip-process: print VIP fail log on console

Change-Id: I82a748248f2c2f62cb49548edaae0cd849425ed0
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agovip-process: add tv exclusive configuration 89/259589/3
Youngjae Cho [Thu, 10 Jun 2021 03:31:33 +0000 (12:31 +0900)]
vip-process: add tv exclusive configuration

Change-Id: I954a156fbeb4126c34dc088f7729027f293cc81d
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>