platform/core/system/resourced.git
8 years agoMake switch to on/off memps logging 21/68421/4
Kichan Kwon [Wed, 4 May 2016 06:34:47 +0000 (15:34 +0900)]
Make switch to on/off memps logging

- Default state : on(mobile, wearable), off(tv)

Change-Id: I6267de0b8805a1318916ef449fcf8e40c0de9af5
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocommon : check null parameter 87/68387/4
Kichan Kwon [Wed, 4 May 2016 01:41:44 +0000 (10:41 +0900)]
common : check null parameter

Change-Id: Ibfb0a5827d536ca56cc494d34f3234544cfc51c8
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agofreezer : update freezer library 03/68103/2
Kichan Kwon [Mon, 2 May 2016 08:27:18 +0000 (17:27 +0900)]
freezer : update freezer library

Change-Id: I36b33b6a12829aee356b75a8d9bada6643bfe8b5
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agofreezer : move aduitd to the VITAL_WAKEUP group 01/68101/2
Kichan Kwon [Mon, 2 May 2016 08:20:23 +0000 (17:20 +0900)]
freezer : move aduitd to the VITAL_WAKEUP group

- auditd receives socket messages from kernel
- If auditd is frozen until VITAL_DISPLAY_WAKEUP event,
 not only auditd can't process but also kernel can't go to the suspend state.
- Therefore, auditd should be included in the VITAL_WAKEUP group.

Change-Id: If0723e703bc72cad17195f2f9208188bd03b492b
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoEnable freezer module 88/67788/2 accepted/tizen/common/20160429.170615 accepted/tizen/ivi/20160429.074453 accepted/tizen/mobile/20160429.074359 accepted/tizen/tv/20160429.074420 accepted/tizen/wearable/20160429.074437 submit/tizen/20160429.062253
Kichan Kwon [Thu, 28 Apr 2016 08:31:36 +0000 (17:31 +0900)]
Enable freezer module

Change-Id: Iccb19c8edcd513dbe175f0f20238cc33f63451e8
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoDefine resourced config path 39/66939/2
Kichan Kwon [Fri, 22 Apr 2016 06:12:34 +0000 (15:12 +0900)]
Define resourced config path

Change-Id: Ibd33c1952b6a3571b7de302de0704bcf5565d6b3
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agovip : remove some VIP processes 12/66912/2
Kichan Kwon [Fri, 22 Apr 2016 03:19:39 +0000 (12:19 +0900)]
vip : remove some VIP processes

- Xorg : no longer used
- amd : to support multi-user

Change-Id: I2eaffddee7b0f44365af0dd5e6258740219a8235
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agovip : register only system slice services 07/66907/2
Kichan Kwon [Fri, 22 Apr 2016 03:15:09 +0000 (12:15 +0900)]
vip : register only system slice services

Change-Id: I91bed94d427cd0a37cd0ff42c9554afc7af31b41
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocpu : use correct name 45/66645/1
Kichan Kwon [Wed, 20 Apr 2016 06:00:15 +0000 (15:00 +0900)]
cpu : use correct name

Change-Id: I182f65811e3fe8f83218c305cd65136f483dfe72
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoRemove useless definitions 27/66627/1
Kichan Kwon [Wed, 20 Apr 2016 03:14:31 +0000 (12:14 +0900)]
Remove useless definitions

Change-Id: I7f8077268b2880328e33156d5f71f9dfe40c4007
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoChange path of exclude list file 84/66284/2 accepted/tizen/common/20160418.142022 accepted/tizen/ivi/20160418.124535 accepted/tizen/mobile/20160418.124253 accepted/tizen/tv/20160418.124303 accepted/tizen/wearable/20160418.124459 submit/tizen/20160418.095021
Kichan Kwon [Mon, 18 Apr 2016 07:31:50 +0000 (16:31 +0900)]
Change path of exclude list file

- /usr/etc -> TZ_SYS_ETC(/opt/etc)

Change-Id: I8850e0b87f08ad66bd33e98227d10a593503bb99
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoblock : prevent overlapped mount 41/65941/3
Kichan Kwon [Thu, 14 Apr 2016 06:38:23 +0000 (15:38 +0900)]
block : prevent overlapped mount

- When resourced checks overlapped mount, it compares path with mtab
- In the mtab, /home/~(link path) is written to /opt/home/~(original path)
- To match path and mounted directory, we use not link path but original path

Change-Id: I2c86b73c2e286b3b426752f408d77c5194b0eb27
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoblock : no longer use configend option at the conf file 13/66113/2
Kichan Kwon [Fri, 15 Apr 2016 08:27:23 +0000 (17:27 +0900)]
block : no longer use configend option at the conf file

- configend is just used to inform the end of conf file

Change-Id: Ibd1bb085af9cd94d3d1601f69ed51fb8be8ede82
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoblock : fix errata 12/65912/1
Kichan Kwon [Thu, 14 Apr 2016 02:55:11 +0000 (11:55 +0900)]
block : fix errata

Change-Id: I62b80369fbcdd7bcf6f07252189391e4a87896a5
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocommon : fix log priority 11/65911/1
Kichan Kwon [Thu, 14 Apr 2016 02:50:07 +0000 (11:50 +0900)]
common : fix log priority

Change-Id: I28366f45df28f20b80b128f683087048484d014f
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoproc-stat : change log priority 95/65895/1
Kichan Kwon [Thu, 14 Apr 2016 01:28:28 +0000 (10:28 +0900)]
proc-stat : change log priority

- If resourced can't find pkgname in the program list, add new one
- Therefore, we don't have to worry about that if making new list is successful

Change-Id: I2360186e07fd408ae0cfbd4b12ebc465cc8b7353
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoFind internal storage root path of all user 15/64115/5 accepted/tizen/common/20160412.131302 accepted/tizen/ivi/20160413.123437 accepted/tizen/mobile/20160413.123151 accepted/tizen/tv/20160413.123351 accepted/tizen/wearable/20160413.123413 submit/tizen/20160412.072933
Kichan Kwon [Wed, 30 Mar 2016 06:24:21 +0000 (15:24 +0900)]
Find internal storage root path of all user

- To adapt multi-user environment
- With modifying this, some methods are also modified.
  - Getting size : accumulate whole root path's
  - Monitoring path : add all user's root path

Change-Id: I79081be2f9de8217ae6f76f2ef689cf830580134
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocommon : use make_cgroup_subdir with consistent rule 92/65492/3
Kichan Kwon [Mon, 11 Apr 2016 09:15:58 +0000 (18:15 +0900)]
common : use make_cgroup_subdir with consistent rule

- parentdir : path of parent
- cgroup_name : cgroup name what you want to make

Change-Id: Idad60c03428974eeabcbfaae9753fad70341d40b
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocommon : remount cgroup directory 21/64421/7
Kichan Kwon [Fri, 1 Apr 2016 05:42:47 +0000 (14:42 +0900)]
common : remount cgroup directory

- systemd mounts cgroup directory to Read-Only

- Therefore, we need to remount to Read-Write before making new cgroup
 and turn back after then

Change-Id: I085dc7f2c7110133e311ebdac43e2c247b5f0950
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoFix errata 78/64078/1
Kichan Kwon [Wed, 30 Mar 2016 02:08:03 +0000 (11:08 +0900)]
Fix errata

Change-Id: I709a7500b3979fad0dffa9e9d061788cdcf3ce6a
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoSet max reading length 56/63856/1 accepted/tizen/common/20160329.050940 accepted/tizen/ivi/20160328.115840 accepted/tizen/mobile/20160328.115721 accepted/tizen/tv/20160328.115750 accepted/tizen/wearable/20160328.115843 submit/tizen/20160328.100804 submit/tizen/20160328.101155
Kichan Kwon [Mon, 28 Mar 2016 06:21:06 +0000 (15:21 +0900)]
Set max reading length

Change-Id: Ic23e693c62bcd81f2a8619986f52111c97c97b41
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoUse unsigned long long to read size of anonymous memory 38/63738/1 submit/tizen/20160325.112940
Kichan Kwon [Fri, 25 Mar 2016 11:14:57 +0000 (20:14 +0900)]
Use unsigned long long to read size of anonymous memory

- The size of anon memory is written with bytes

- To prevent overflow, use larger variable

Change-Id: Icdeeb08595b2e267960d09112536a5003e722860
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoSet max reading length 38/63538/2 accepted/tizen/common/20160324.173209 accepted/tizen/ivi/20160324.131755 accepted/tizen/mobile/20160324.133122 accepted/tizen/tv/20160324.133120 accepted/tizen/wearable/20160324.132901 submit/tizen/20160324.114937
Kichan Kwon [Thu, 24 Mar 2016 11:25:10 +0000 (20:25 +0900)]
Set max reading length

- The length of buf = PATH_MAX (linux/limits.h)

Change-Id: Ic58b774a8a215f144aa34e0bbc5d4c70852e46d8
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoMerge "Disable freezer and swap of mobile probile for consitency with wearable profil...
Kwon [Thu, 24 Mar 2016 11:20:43 +0000 (04:20 -0700)]
Merge "Disable freezer and swap of mobile probile for consitency with wearable profile" into tizen

8 years agoMake function to get the root path of (internal, external) storage 81/62781/6
Kichan Kwon [Fri, 18 Mar 2016 07:23:04 +0000 (16:23 +0900)]
Make function to get the root path of (internal, external) storage

- With making this, modify some functions to use new function.

Change-Id: Iadeabf9374f1fbd1d9430527c53524b30714cfb2
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoApply Tizen directory path guide 04/61504/3
Kichan Kwon [Tue, 8 Mar 2016 09:14:14 +0000 (18:14 +0900)]
Apply Tizen directory path guide

* Changed path

- /opt/usr/etc, /etc/opt -> TZ_SYS_ETC (/opt/etc)
- /opt/storage -> TZ_SYS_STORAGE (/opt/media)
- /opt/usr/data -> TZ_SYS_DATA (/opt/data)
- /opt/usr/dbspace -> TZ_SYS_DB (/opt/dbspace)
- /opt/usr/share -> TZ_SYS_SHARE (/opt/share)

Change-Id: Ibaa6ac20d768e5e6fe52b5f971713f1f77e57cb2
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoDisable freezer and swap of mobile probile for consitency with wearable profile 14/63414/1
Kunhoon Baik [Wed, 23 Mar 2016 16:05:37 +0000 (01:05 +0900)]
Disable freezer and swap of mobile probile for consitency with wearable profile

Change-Id: Ia738d93b5eb5b51b97c2e6734c9e5f837d6b7c45

8 years agoMerge "Disable mem-stress.service" into tizen accepted/tizen/common/20160304.195552 accepted/tizen/ivi/20160305.093824 accepted/tizen/mobile/20160305.093737 accepted/tizen/tv/20160305.093749 accepted/tizen/wearable/20160305.093808 submit/tizen/20160304.064902
Kichan Kwon [Fri, 4 Mar 2016 06:48:18 +0000 (22:48 -0800)]
Merge "Disable mem-stress.service" into tizen

8 years agoDetach memps module 32/61132/1
Kichan Kwon [Fri, 4 Mar 2016 06:37:04 +0000 (15:37 +0900)]
Detach memps module

- This module will be managed separately

Change-Id: I9dd88efa76d8927507ea3eeb8b1e06b86506d57f
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoDisable mem-stress.service 05/61005/2
Kichan Kwon [Thu, 3 Mar 2016 07:53:43 +0000 (16:53 +0900)]
Disable mem-stress.service

- It just occupies memory and does nothing

- But it can be used to make low memory environment, so we don't delete it

Change-Id: I5cd2f8ab8789c0ce525b108dd9cb97b15fb2879f
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoproc-stat : fix errata 22/60722/1 accepted/tizen/common/20160302.193633 accepted/tizen/ivi/20160302.072739 accepted/tizen/mobile/20160302.072650 accepted/tizen/tv/20160302.072701 accepted/tizen/wearable/20160302.072720 submit/tizen/20160302.051130
Kichan Kwon [Wed, 2 Mar 2016 02:27:53 +0000 (11:27 +0900)]
proc-stat : fix errata

Change-Id: I4bf737e527ed2dee040c8f9844bb5a66693048fd
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agovmpressure : don't make /proc app list 69/59969/3 accepted/tizen/ivi/20160222.081958 accepted/tizen/mobile/20160222.081812 accepted/tizen/tv/20160222.081848 accepted/tizen/wearable/20160222.081924 submit/tizen/20160222.063236
Kichan Kwon [Mon, 22 Feb 2016 02:15:44 +0000 (11:15 +0900)]
vmpressure : don't make /proc app list

 - As it reads (pid, appname), compare appname with vip list

Change-Id: I3a9f9377e0ee44ea55e525d4a167f749cdc453a6
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agotests : set initial value 58/59758/1 accepted/tizen/ivi/20160219.002314 accepted/tizen/mobile/20160219.002224 accepted/tizen/tv/20160219.002242 accepted/tizen/wearable/20160219.002257 submit/tizen/20160218.085406
Kichan Kwon [Thu, 18 Feb 2016 08:20:37 +0000 (17:20 +0900)]
tests : set initial value

Change-Id: I354ab3a65e27591466615eb0558db73a9084069c
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoMerge "vmpressure : improve VIP app register process" into tizen
Kichan Kwon [Wed, 17 Feb 2016 03:33:32 +0000 (19:33 -0800)]
Merge "vmpressure : improve VIP app register process" into tizen

8 years agovmpressure : improve VIP app register process 96/59196/7
Kichan Kwon [Thu, 11 Feb 2016 09:20:23 +0000 (18:20 +0900)]
vmpressure : improve VIP app register process

- To convert appname to pid, existing code opens cmdline file and match appname.
 However, this process is file operation, so it causes performance degradation.

- To decrease file operation, (appname,pid) array is maken before conversion.
 By using this array, we don't have to access cmdline file many times.

Change-Id: I2de243a5ef93615288907cdd6eb848f8b15e9be1
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoRevert "vmpressure : improve VIP app register process" 07/59607/1
Kichan Kwon [Wed, 17 Feb 2016 01:19:06 +0000 (10:19 +0900)]
Revert "vmpressure : improve VIP app register process"

This reverts commit bb60ed5b3cf0d9f77d8ee1c354607b6730235456.

Change-Id: I1cf6398c8a25a96fa4d69d20bb0e2ad3bfb65163

8 years agoblock : change log priority 25/59525/1 accepted/tizen/mobile/20160216.103526 accepted/tizen/tv/20160216.103544 accepted/tizen/wearable/20160216.103605 submit/tizen/20160216.085528
Kichan Kwon [Tue, 16 Feb 2016 08:38:05 +0000 (17:38 +0900)]
block : change log priority

- This log just informs accessing file and not returning error if this error is printed.

 Therefore, to prevent misunderstanding, change the priority to INFO

Change-Id: I51a10d93eee246144ba7081f2bf4d562bc6f5329
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agovmpressure : improve VIP app register process 96/59196/1
Kichan Kwon [Thu, 11 Feb 2016 09:20:23 +0000 (18:20 +0900)]
vmpressure : improve VIP app register process

- To convert appname to pid, existing code opens cmdline file and match appname.
 However, this process is file operation, so it causes performance degradation.

- To decrease file operation, (appname,pid) array is maken before conversion.
 By using this array, we don't have to access cmdline file many times.

Change-Id: I2de243a5ef93615288907cdd6eb848f8b15e9be1
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agonetwork: remove unused header 25/55925/1 accepted/tizen/ivi/20160218.023955 accepted/tizen/mobile/20151230.120249 accepted/tizen/tv/20151230.120322 accepted/tizen/wearable/20151230.120341 submit/tizen/20151230.082436 submit/tizen_ivi/20160217.000000 submit/tizen_ivi/20160217.000003
Prajwal A N [Wed, 30 Dec 2015 07:35:15 +0000 (16:35 +0900)]
network: remove unused header

* genl.h is not used currently
* it also violates the license requirement

Change-Id: I67472bd60b465905d65d2da517cf0f1e93c0101c
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agoMerge branch 'devel/tizen_2.4' into tizen 44/55544/1 accepted/tizen/mobile/20151229.072840 accepted/tizen/tv/20151229.072918 accepted/tizen/wearable/20151229.072940 submit/tizen/20151229.033448
Prajwal A N [Thu, 24 Dec 2015 10:25:00 +0000 (19:25 +0900)]
Merge branch 'devel/tizen_2.4' into tizen

* added CPU tests
* refactored test module
* removed secure coding issues

Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
Conflicts:
packaging/resourced.spec
src/tests/network/resourced_data_usage_test.c
src/tests/proc-stat/resourced_proc_stat_test.c

Change-Id: I1aebe8558f933a258aced35c3c040ab8befe0ba2

8 years agocommon: resolved secure coding errors devel/tizen_2.4
Prajwal A N [Wed, 23 Dec 2015 04:33:29 +0000 (13:33 +0900)]
common: resolved secure coding errors

Change-Id: I5cec16ef63b09027dc02b42a3bec27780004b327
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agotests: added tests for CPU module
Prajwal A N [Fri, 18 Dec 2015 05:56:02 +0000 (14:56 +0900)]
tests: added tests for CPU module

* tests cgroup creation
* tests different app actions

Change-Id: I1843cde8dff486ebc0127d12b320426cb669527b
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agotests: refactored code
Prajwal A N [Fri, 18 Dec 2015 05:51:10 +0000 (14:51 +0900)]
tests: refactored code

* organized code into usable modules

Change-Id: I898bb93a44eb3aa99d770b85773f824168a4e57e
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agodebug: enabled debug logging
Prajwal A N [Wed, 2 Dec 2015 07:35:20 +0000 (16:35 +0900)]
debug: enabled debug logging

* some logs are not needed normally
* added new flag to disable/enable these logs
* organized some log messages

Change-Id: I9e0ef1428ac6d6d2d2cf244be5eb1f01909f8c40
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agoMerge branch 'devel/tizen_2.4' into tizen 41/54341/2 accepted/tizen/mobile/20151216.052220 accepted/tizen/tv/20151216.052251 accepted/tizen/wearable/20151216.052323 submit/tizen/20151215.235502 submit/tizen_common/20151229.142028 submit/tizen_common/20151229.144031 submit/tizen_common/20151229.154718
Prajwal A N [Tue, 15 Dec 2015 01:47:38 +0000 (10:47 +0900)]
Merge branch 'devel/tizen_2.4' into tizen

* adding TC suite to resourced
* proc-stat, memory, network modules supported (partially)

Change-Id: Ie5fd2b998fb2e90d8d8036f80f77cf4b06a2e7d1
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agotests: disable tests by default
Prajwal A N [Mon, 14 Dec 2015 07:26:47 +0000 (16:26 +0900)]
tests: disable tests by default

* tests module is going to be disabled
* will be enabled locally for testing

Change-Id: Id375e4799cf4705a223cc82653fd08c9ac962b0d
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agotests: added test for network APIs
Prajwal A N [Sun, 13 Dec 2015 23:55:02 +0000 (08:55 +0900)]
tests: added test for network APIs

* testing all network APIs (provided by libresourced)

Change-Id: Ide7fe6cb1c9f91050779efc051208b579a4c980c
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agotests: added proc-stat API test
Prajwal A N [Sun, 13 Dec 2015 23:51:00 +0000 (08:51 +0900)]
tests: added proc-stat API test

* added tests for the proc_stat_get_pid_entry API
* other API tests will be added in future

Change-Id: Ic4bc35bfd8ae06d8c0a92af44f91d687beabda1f
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agotests: added tests package
Prajwal A N [Fri, 31 Jul 2015 11:42:57 +0000 (20:42 +0900)]
tests: added tests package

* added code to test lowmem module in resourced
* added util programs and scripts

Change-Id: Idb8914af71febb32e34082bfd224fc6213fe827e
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agotests: removed slp tests
Prajwal A N [Fri, 11 Dec 2015 04:18:04 +0000 (13:18 +0900)]
tests: removed slp tests

* not using current test suite
* will be replaced by a different test suite

Change-Id: I2160102d3f2ee65c7d64618d9a47dd8d06400581
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agocommon: change service type to simple
Prajwal A N [Tue, 8 Dec 2015 03:09:14 +0000 (12:09 +0900)]
common: change service type to simple

* notify type is creating waiting before launch
* changing this to simple to remove uneccessary waiting times

Change-Id: I6bf26289d229337c993d3de10fada89307b8e0cc
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agocommon: adding support for i686 50/53750/1 accepted/tizen/mobile/20151209.070605 accepted/tizen/tv/20151209.070645 accepted/tizen/wearable/20151209.070732 submit/tizen/20151209.061613
Prajwal A N [Wed, 9 Dec 2015 06:14:28 +0000 (15:14 +0900)]
common: adding support for i686

* i686 is used in emulator

Change-Id: I18962d2b3514200855b3f04a1ffafa8aab55e3aa
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agocommon: support emulator profiles 24/53724/1 submit/tizen/20151209.025448
Prajwal A N [Wed, 9 Dec 2015 02:38:35 +0000 (11:38 +0900)]
common: support emulator profiles

* added system-freezer lib files for x86 arch

Change-Id: I3a7dfd1b103cdf8b5c4888d723d81d0b38140b1a
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agoMerge branch 'devel/tizen_2.4' into tizen 27/53327/2 submit/tizen/20151208.073148
Prajwal A N [Wed, 2 Dec 2015 05:17:02 +0000 (14:17 +0900)]
Merge branch 'devel/tizen_2.4' into tizen

Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
Change-Id: I6a6d867c49be60dd54102d235d1eb13ea605b16e

8 years agofreezer: updated libsystem-freezer.so file
Prajwal A N [Fri, 27 Nov 2015 02:15:26 +0000 (11:15 +0900)]
freezer: updated libsystem-freezer.so file

* updated system-freezer library file
* changes till "unmounting at poweroff" included

Change-Id: Ia2fd0e64731f9e57e84a2f7705306ef86060a5a0
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agoswap: change code to build for disabled swap module
Prajwal A N [Fri, 27 Nov 2015 01:45:03 +0000 (10:45 +0900)]
swap: change code to build for disabled swap module

* earlier code was working exclusively for enabled swap module
* changed the build code and common definitions to build for disabled swap module

Change-Id: I7f730f2a4e2ec46f91c97a2ee3e1c6ebae8920a2
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agoswap: removed force reclaim feature from swap module
Prajwal A N [Thu, 26 Nov 2015 08:16:31 +0000 (17:16 +0900)]
swap: removed force reclaim feature from swap module

* force_reclaim feature was rejected by the mainline linux group
* changed use of force_reclaim to hard limit (limit_in_bytes)
* added conf file to control the parameters of swap module
* changed load_swap_config function to include code to read new params in swap.conf
* added notifier to reset swap cgroup hard limit when the system returns to normal memory pressure

Change-Id: I27f3397dba5f8a52ce8c6c85b0d2aef755f92f3d
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agoMerge branch 'devel/tizen_2.4' into tizen 27/53127/2
Prajwal A N [Tue, 1 Dec 2015 23:46:00 +0000 (08:46 +0900)]
Merge branch 'devel/tizen_2.4' into tizen

Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
Change-Id: Ib4e8153b78c98d926d8f32ac2c3a47deee67b567

8 years agorebase: rebased latest tizen 2.4 code
Prajwal A N [Tue, 24 Nov 2015 07:26:33 +0000 (16:26 +0900)]
rebase: rebased latest tizen 2.4 code

* this branch will keep track of the development of tizen 2.4
* this branch will be merged periodically into tizen
* the code in this branch may not build in tizen environment

Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agoApply dbus-cynara rule for resourced 33/48833/1 accepted/tizen/mobile/20150930.115612 accepted/tizen/tv/20150930.115615 accepted/tizen/wearable/20150930.115626 submit/tizen/20150930.101030 tizen_3.0.m2.a1_mobile_release tizen_3.0.m2.a1_tv_release
pr.jung [Wed, 30 Sep 2015 08:07:15 +0000 (17:07 +0900)]
Apply dbus-cynara rule for resourced

Change-Id: Ib5b3602661754bea03145065a39d5d2b54d008ef
Signed-off-by: pr.jung <pr.jung@samsung.com>
8 years agomemps: fix the broken result on kernel v4.0 06/46306/1 tizen_3.0.m1_mobile tizen_3.0.m1_tv accepted/tizen/mobile/20150819.083005 accepted/tizen/tv/20150819.083019 accepted/tizen/wearable/20150819.083039 submit/tizen/20150819.074147 submit/tizen/20150819.074406 submit/tizen_common/20151023.083358 submit/tizen_common/20151026.085049 tizen_3.0.m1_mobile_release tizen_3.0.m1_tv_release
Sangjung Woo [Wed, 19 Aug 2015 05:26:03 +0000 (14:26 +0900)]
memps: fix the broken result on kernel v4.0

The result of memps is broken on Tizen 3.0 since the kernel version is
4.0 or above. This patch fixes that bug.

Change-Id: Ifdbdcd06d69af9fa3f058507349febfcfd449e35
Signed-off-by: Lukasz Malesza <l.malesza@samsung.com>
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
8 years agoclean up the unit files & options 67/45767/1 accepted/tizen/mobile/20150811.091613 accepted/tizen/tv/20150811.091629 accepted/tizen/wearable/20150811.091643 submit/tizen/20150811.075724
Sangjung Woo [Tue, 11 Aug 2015 01:39:23 +0000 (10:39 +0900)]
clean up the unit files & options

Because of some buggy code in spec file, the systemd unit files such as
resourced.service are installed into the wrong location (i.e.
/usr/lib64/systemd/system/). This patch fixes the bug and also clean up
unused resourced-cpucgroup.service. timer-slack is not necessary for
tizen 3.0.

Change-Id: I16c1c1e22dbfe0c8ec71fdbe394a07a89fcb41b7
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
9 years agosmack: apply Smack 3-domain feature 81/42681/2 accepted/tizen/mobile/20150702.045311 accepted/tizen/tv/20150702.040246 accepted/tizen/wearable/20150702.040300 submit/tizen/20150702.021936
Sangjung Woo [Wed, 1 Jul 2015 12:05:14 +0000 (21:05 +0900)]
smack: apply Smack 3-domain feature

This patch makes all manifest file as Smack 3-domain feature.

Change-Id: I914491b12f3f070864d257e11786576c9f7b6891
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
9 years agoOverall rebase: add up-to-date resourced codes to public repo 70/40770/2 accepted/tizen_3.0.2015.q2_common tizen_3.0.2015.q2_common accepted/tizen/3.0.2015.q2/common/20150615.091834 accepted/tizen/common/20150610.092527 accepted/tizen/mobile/20150610.095811 accepted/tizen/tv/20150610.095819 accepted/tizen/wearable/20150610.095757 submit/tizen/20150610.013710 submit/tizen_3.0.2015.q2_common/20150615.075539
Sangjung Woo [Tue, 9 Jun 2015 02:11:50 +0000 (11:11 +0900)]
Overall rebase: add up-to-date resourced codes to public repo

* Rebase work until 'memory: disabled swap and vmpressure modules for
  mobile profile (c4e54093)'
* Support runtime-info API
* Fix the minor bugs & turn up each module
* Support aarch64, arm32 and emulator

Change-Id: I8dfc1d1d3aa9bcdd89f7632752d968fe3a854484
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
9 years agoRemoved sensord from vip list 65/37165/1 accepted/tizen/common/20150522.095532 submit/tizen_common/20150522.094241
Prajwal A N [Fri, 20 Mar 2015 04:18:09 +0000 (13:18 +0900)]
Removed sensord from vip list

* Removed sensord from very important process list (in vip-agent module)

Change-Id: I986f3e647cc565dada511791b7c4f24b9de2dfd9
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
9 years agoCorrected some rpm build warnings and errors 64/37164/1
Prajwal A N [Fri, 20 Mar 2015 04:14:45 +0000 (13:14 +0900)]
Corrected some rpm build warnings and errors

* Corrected license string
* Added %config macro to the conf files in the files section of spec file

Change-Id: Ibfde2a828c1dc28a8c27d204ebe8a535ff6a3782
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
9 years agoResolved service files error 58/34658/3 accepted/tizen/tv/20150203.115008 submit/tizen_tv/20150203.103238
Prajwal A N [Fri, 30 Jan 2015 07:32:32 +0000 (16:32 +0900)]
Resolved service files error

Removed the tizen-mobile-env environment file requirement and the default type (set to simple).

Change-Id: If002860c3cc9d1571120eb79efe4e4d8410d313b
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
9 years agoChanged package name to resourced 09/34309/2 accepted/tizen/mobile/20150123.091515 accepted/tizen/tv/20150123.090956 accepted/tizen/wearable/20150123.091213 submit/tizen_mobile/20150123.081300 submit/tizen_tv/20150123.081251 submit/tizen_wearable/20150123.081308
Prajwal A N [Fri, 23 Jan 2015 06:57:24 +0000 (15:57 +0900)]
Changed package name to resourced

Changed package name from system-resource to resourced and made needed changes in related files.
Also resolved some dependency errors in the spec file related to the package name.

Change-Id: Ie4a675999a05ef8032c1d186fb2a8a5ab58db75a
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
9 years agoEnabled build support for 64 bit architecture 01/33801/5
Prajwal A N [Thu, 15 Jan 2015 07:00:16 +0000 (16:00 +0900)]
Enabled build support for 64 bit architecture

Changed CMakeLists and spec file code to enable building for both 32 bit and 64 bit architectures. Changed libdir to LIB_INSTALL_DIR.
Changed INSTALL destination appropriately.
Package successfully builds for the following repos
* ia32 (ia32-wayland, ia32-x11)
* armv7l (arm-wayland, arm-x11)
* aarch64 (arm64-wayland, arm64-x11)
* x86_64 (x86_64-wayland, x86_64-x11)

Change-Id: I6ed707ff0082fafdba03761220a4c3e089fc7dfa
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
9 years agoChanged casting expression for 64 bit arch. 96/33796/7
Prajwal A N [Thu, 15 Jan 2015 03:42:07 +0000 (12:42 +0900)]
Changed casting expression for 64 bit arch.

Casting pointer to int directly does not work in 64 bit environments. Thus changed the casting expression.
Added a check to ensure that arguments passed to strstr function are not null.

Change-Id: I4765d0503b65e080f0394481448bbd1b3050c08e
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
9 years agoAdded eina package 98/33798/1
Prajwal A N [Thu, 15 Jan 2015 05:25:23 +0000 (14:25 +0900)]
Added eina package

Added eina package to CMakeLists and spec file.

Change-Id: Ib3d7c8959f4bd41a171e4a10b50763e17dab2bc0
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
9 years agoDefined spec variables 97/33797/1
Prajwal A N [Thu, 15 Jan 2015 05:03:21 +0000 (14:03 +0900)]
Defined spec variables

The variables defined in this patch used to be defined only for particular profiles. But they are used later in spec file.
This resulted in a bad %if condition. Thus defining (setting to default value OFF) these variables always.

Change-Id: Ie8af5baf5a8a50271732ec36f71fbafc7ab385e2
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
9 years agoRemoved journal package 91/33791/3
Prajwal A N [Thu, 15 Jan 2015 02:09:15 +0000 (11:09 +0900)]
Removed journal package

The libjournal package is not yet present in Tizen public. Thus removed the use of journal package in resourced.

Change-Id: I110d7081bd2132f2997f323ff410d18425a7f2c3
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
9 years agoAdded latest resourced code to public repo 88/33788/2
Prajwal A N [Thu, 15 Jan 2015 01:59:23 +0000 (10:59 +0900)]
Added latest resourced code to public repo

Change-Id: Ideb61e5414c7ce5d6635b8d624fda7ac12127d52
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
10 years agoswap: change the return value to ERROR_NONE in case that swap is off 79/22179/1
Taeyoung Kim [Thu, 29 May 2014 13:26:20 +0000 (22:26 +0900)]
swap: change the return value to ERROR_NONE in case that swap is off

- When swap is off, the swap module cannot be found.
  This is normal operation, and the return value
  should be changed from ERROR_FAIL to ERROR_NONE.

Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
Change-Id: Id8490ce0669408519b32373e057330b27a237617

10 years agoservice: add memory limit option 74/22174/1
Taeyoung Kim [Thu, 29 May 2014 12:58:03 +0000 (21:58 +0900)]
service: add memory limit option

- Memory usage of resourced is under 1MB currently.
- If memory leak or other problems occur, resourced
  will be re-launched. The limit of memory usage is 10MB.

Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
Change-Id: I75c38b3f93856a292163add7655251332d10dbfb

10 years agoSecond part of datausage module. 66/20766/3
Przemyslaw Kedzierski [Mon, 12 May 2014 12:31:28 +0000 (14:31 +0200)]
Second part of datausage module.

The datausage module is used for network traffic statistics.
This commit adds common part of code of datausage module,
a skeleton code for initialization, finalization and control.

Change-Id: Ifef33c6752577888fde6a14a5b588846d21afff1
Signed-off-by: Przemyslaw Kedzierski <p.kedzierski@samsung.com>
10 years agoAdd part of datausage code. 28/20628/1
Przemyslaw Kedzierski [Fri, 9 May 2014 15:23:35 +0000 (17:23 +0200)]
Add part of datausage code.

    The datausage module is used for network traffic statistics.
    This commit adds parts of code of datausage module,
    used in resourced module.

Change-Id: Idc695eeaf0f1e50dbdc83a9b7274f1b7d7fb950f
Signed-off-by: Przemyslaw Kedzierski <p.kedzierski@samsung.com>
10 years agomemory: add swap support 00/18600/1
Chanho Park [Wed, 26 Mar 2014 08:14:12 +0000 (17:14 +0900)]
memory: add swap support

This patch introduces swap module which is based on memory cgroup
swap extension. This also enables support of flash(eMMC) swap file.
Due to limitation of nand flash write endurance, we limited a
writeback size to 512MB per day.
When we need more memory from requests, the memcg reclaims the memory
from swap cgroup. The resourced can choose the victims by oomadj value.

This patch also includes clean-up of lowmem-process source files
because we don't need them anymore.

Change-Id: I9c09bc5329a5d3e619952c249be3d3712b15c609
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
10 years agoScripts for unit tests. 14/17214/1
Przemyslaw Kedzierski [Wed, 5 Mar 2014 11:15:42 +0000 (12:15 +0100)]
Scripts for unit tests.

Scripts needed for unit testing API functions.

Change-Id: I0bdd27ca6edb215d58fe05093b9a955685ec6813
Signed-off-by: Przemyslaw Kedzierski <p.kedzierski@samsung.com>
10 years agoAdd utils - network part. 85/17085/1
Przemyslaw Kedzierski [Mon, 3 Mar 2014 15:54:52 +0000 (16:54 +0100)]
Add utils - network part.

Continuation of work from previous commit.

Change-Id: I302213fc6d901f89aac6dc4ff09d149a78e28a5d
Signed-off-by: Przemyslaw Kedzierski <p.kedzierski@samsung.com>
10 years agoAdd utils, tools and tests. 84/17084/1
Przemyslaw Kedzierski [Mon, 3 Mar 2014 15:14:55 +0000 (16:14 +0100)]
Add utils, tools and tests.

These tools are for testing core functionalities used by packet and system
like small in-file databases, hash tables, cgroups, network udp traffic,
and getting various system information about processes and network.

Change-Id: I775706b19d3b1c829d7b457b065562da7f33ac92
Signed-off-by: Przemyslaw Kedzierski <p.kedzierski@samsung.com>
10 years agoCode cleanup. 71/17071/1
Przemyslaw Kedzierski [Mon, 3 Mar 2014 12:30:14 +0000 (13:30 +0100)]
Code cleanup.

Some cleanup of code, spec file and cmake files.

Change-Id: I3cd6bb975617e23cb4bcf39468cfc950ad7cc996
Signed-off-by: Przemyslaw Kedzierski <p.kedzierski@samsung.com>
10 years agoAdd cpu module. 90/16690/1
Przemyslaw Kedzierski [Mon, 10 Feb 2014 10:19:00 +0000 (11:19 +0100)]
Add cpu module.

The cpu module is used for moving processes and tasks
between cgroups.

Change-Id: I7fd296c41aac74951d62d77c50bd343ebc43b986
Signed-off-by: Przemyslaw Kedzierski <p.kedzierski@samsung.com>
10 years agoAdd memps module. 59/16659/1
Przemyslaw Kedzierski [Mon, 10 Feb 2014 10:03:21 +0000 (11:03 +0100)]
Add memps module.

The memps is a tool that shows memory usage,
total and by each process.

Change-Id: I6d80042c9ba36ea8921832593c04c647fcdad8f1
Signed-off-by: Przemyslaw Kedzierski <p.kedzierski@samsung.com>
10 years agoAdd network module. 57/16657/1
Przemyslaw Kedzierski [Mon, 10 Feb 2014 10:00:50 +0000 (11:00 +0100)]
Add network module.

Add network module and a stub for data_usage module.

The network module manages options, limits and quotas for
network interfaces.

Change-Id: I3e9a7a481ddfb2463d5ee8b429198e31ebc94f99
Signed-off-by: Przemyslaw Kedzierski <p.kedzierski@samsung.com>
10 years agoAdd powertop-wrapper module. 25/16525/1
Przemyslaw Kedzierski [Fri, 7 Feb 2014 15:42:35 +0000 (16:42 +0100)]
Add powertop-wrapper module.

Some corrections to cmake and spec files.

The powertop-wrapper module runs powertop tool,
gathers its results and forms in reports.

Change-Id: Ib366442c38334b6e2d996c9c695f9bde38a2f9ec
Signed-off-by: Przemyslaw Kedzierski <p.kedzierski@samsung.com>
10 years agoUpdated memory module. 92/16392/1
Przemyslaw Kedzierski [Fri, 7 Feb 2014 15:34:49 +0000 (16:34 +0100)]
Updated memory module.

The memory module implements, runs and controls
oom_kill'er, and its dbus interface.

Change-Id: Ib28de58a89fdaddf2a8042399f1b422561c9a4b7
Signed-off-by: Przemyslaw Kedzierski <p.kedzierski@samsung.com>
10 years agoUpdate proc-stat module. 48/16348/2
Przemyslaw Kedzierski [Fri, 7 Feb 2014 15:32:31 +0000 (16:32 +0100)]
Update proc-stat module.

The proc-stat module provides many information
about system and processes from /proc filesystem,
and also information about windows from Xwindow system.

Change-Id: I1ec5987915c8bfe8a93ee539240284d13d3fe623
Signed-off-by: Przemyslaw Kedzierski <p.kedzierski@samsung.com>
10 years agoUpdate the main part of resourced module. 65/16265/1
Przemyslaw Kedzierski [Wed, 12 Feb 2014 09:43:21 +0000 (10:43 +0100)]
Update the main part of resourced module.

The resource daemon contains main functinalities of program,
parses command line options, manages modules, initialises
dbus interfaces.

Change-Id: I54a3cf9efcefda382167e97c366fb532eba3f97d
Signed-off-by: Przemyslaw Kedzierski <p.kedzierski@samsung.com>
10 years agoAdd Process handler 11/12511/1
Taeyoung Kim [Mon, 18 Nov 2013 01:36:30 +0000 (10:36 +0900)]
Add Process handler

- Process Handler manages the oom_score_adj value.
- Appcore changes processes to Foreground/Background
  and deviced changes processes to Active/Inactive by resourced apis
- oom_score-adj
  = Root daemons: 0
  = Process init value:  100
  = Foreground Locked:   150 (ex. Multimedia apps, ...)
  = Foreground Unlocked: 200
  = Background Locked:   250 (ex. Background Music player, ...)
  = Background Unlocked: 300
  = Maximum value: 990

Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
Change-Id: I6ca0e3524dc8132aaa2a9bac6a2a6ba8d91bb148

10 years agoAdd Memory control (OOM handler) 07/12507/2
Taeyoung Kim [Mon, 18 Nov 2013 01:02:40 +0000 (10:02 +0900)]
Add Memory control (OOM handler)

- Memory cgroup is used to check OOM status and to kill processes to secure memory
  = Memory cgroup notices to resourced when remaining memory is on low pressure state
    and medium pressure state. When low pressure, resourced send signal to apps
    to use malloc-trim. And when medium pressure, resourced kills processes.
  = The victims sre decided by oom_score_adj value.
  = OOM killer is disabled
  = ex) For 1GB memory, the memory is on low pressure state when the remaining memory is under 200MB.
        And the memory is on medium pressure state when the remaining memory is under 160MB.

Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
Change-Id: I21d84a2c61680a43b032bad21e77816da85c4ad2

10 years agoInitial commit for Resourced 27/12427/3
Taeyoung Kim [Fri, 15 Nov 2013 04:56:28 +0000 (13:56 +0900)]
Initial commit for Resourced

Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
Change-Id: I9c06df974efabf248bc78e0292f33eb0cd193fc1

10 years agoInitial empty repository master submit/tizen/20190131.142734
Sehong Na [Thu, 22 Aug 2013 05:18:30 +0000 (22:18 -0700)]
Initial empty repository