From 4e0a903a42f1acd7a01eacdcb2f5f5c50ebe135f Mon Sep 17 00:00:00 2001 From: Simon Shields Date: Tue, 2 Feb 2016 22:31:38 +1100 Subject: i9300: downclock more aggressively previously, pegasusq would keep 3 or 4 cores active with static content on the screen tweak the governor's values so that sometimes we get down to 1 core active with screen on, both by increasing the on/off clock speeds/rq sizes of secondary cores, bumping up_threshold and encouraging faster downclocking. Change-Id: I698bec823312cac7b859ed8d5ac303873fddc7bc --- rootdir/init.target.rc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'rootdir') diff --git a/rootdir/init.target.rc b/rootdir/init.target.rc index 4b9b015..1c94d39 100644 --- a/rootdir/init.target.rc +++ b/rootdir/init.target.rc @@ -3,6 +3,7 @@ on init # ko files for FM Radio insmod /system/lib/modules/Si4709_driver.ko + on post-fs-data # icd exec icd_check @@ -59,4 +60,21 @@ service gps-daemon /system/bin/sh /system/bin/gps_daemon.sh group system inet sdcard_rw gps seclabel u:r:glgps:s0 - +on property:dev.bootcomplete=1 +# boot on default pegasusq settings (for better performance) +# switch to more conservative settings after bootup is complete + write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_1_1 500000 + write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_2_0 500000 + write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_2_1 700000 + write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_3_0 700000 + write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_3_1 900000 + write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_4_0 900000 + write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_1_1 150 + write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_2_0 150 + write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_2_1 250 + write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_3_0 250 + write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_3_1 350 + write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_4_0 450 + write /sys/devices/system/cpu/cpufreq/pegasusq/up_threshold 90 + write /sys/devices/system/cpu/cpufreq/pegasusq/cpu_down_rate 10 + write /sys/devices/system/cpu/cpufreq/pegasusq/down_differential 3 -- cgit v1.1 From dfd4d7db60d9b1abeeadcd203179803e6d9be7c6 Mon Sep 17 00:00:00 2001 From: Simon Shields Date: Sun, 14 Feb 2016 23:15:20 +1100 Subject: i9300: enable f2fs support Change-Id: I4405cbf6573e277ac7d2dbcb0014131d9cbbcc9d --- rootdir/fstab.smdk4x12 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'rootdir') diff --git a/rootdir/fstab.smdk4x12 b/rootdir/fstab.smdk4x12 index 507d3ed..878876e 100644 --- a/rootdir/fstab.smdk4x12 +++ b/rootdir/fstab.smdk4x12 @@ -4,8 +4,10 @@ # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK /dev/block/mmcblk0p3 /efs ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait /dev/block/mmcblk0p9 /system ext4 ro,noatime wait +/dev/block/mmcblk0p8 /cache f2fs noatime,nosuid,nodev wait /dev/block/mmcblk0p8 /cache ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait /dev/block/mmcblk0p10 /preload ext4 noatime,nosuid,nodev,journal_async_commit wait +/dev/block/mmcblk0p12 /data f2fs noatime,nosuid,nodev wait,check,encryptable=footer /dev/block/mmcblk0p12 /data ext4 noatime,nosuid,nodev,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer # vold-managed volumes ("block device" is actually a sysfs devpath) -- cgit v1.1 From fc026276eb8c351447d4f6b0a6b65c48e64327bd Mon Sep 17 00:00:00 2001 From: Simon Shields Date: Fri, 12 Feb 2016 23:36:41 +1100 Subject: i9300: chown pegasusq cpufreq nodes to system:system Change-Id: Iadbeeffcf0db58a0a96f99df596cdb0f32dd589f --- rootdir/init.target.rc | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'rootdir') diff --git a/rootdir/init.target.rc b/rootdir/init.target.rc index 1c94d39..492b130 100644 --- a/rootdir/init.target.rc +++ b/rootdir/init.target.rc @@ -2,6 +2,36 @@ on init export LD_SHIM_LIBS /system/lib/libsec-ril.so|libsamsung_symbols.so # ko files for FM Radio insmod /system/lib/modules/Si4709_driver.ko + chown system system /sys/devices/system/cpu/cpufreq/pegasusq + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/cpu_down_freq + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/cpu_down_rate + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/cpu_up_freq + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/cpu_up_rate + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/cpucore_table + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/down_differential + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/dvfs_debug + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/freq_step + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_1_1 + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_2_0 + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_2_1 + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_3_0 + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_3_1 + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_4_0 + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_lock + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_1_1 + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_2_0 + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_2_1 + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_3_0 + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_3_1 + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_4_0 + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/ignore_nice_load + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/io_is_busy + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/up_threshold + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/min_cpu_lock + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/max_cpu_lock + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/sampling_rate + + on post-fs-data -- cgit v1.1 From b0b03ea832d645620527342e5efc465baafec50e Mon Sep 17 00:00:00 2001 From: Simon Shields Date: Sat, 20 Feb 2016 23:23:17 +1100 Subject: i9300: don't overwrite powerhal governor settings from init Change-Id: Id704829e1f65b538e7fd05a599a1159ffe37aeb1 --- rootdir/init.target.rc | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'rootdir') diff --git a/rootdir/init.target.rc b/rootdir/init.target.rc index 492b130..a9a3168 100644 --- a/rootdir/init.target.rc +++ b/rootdir/init.target.rc @@ -89,22 +89,3 @@ service gps-daemon /system/bin/sh /system/bin/gps_daemon.sh user gps group system inet sdcard_rw gps seclabel u:r:glgps:s0 - -on property:dev.bootcomplete=1 -# boot on default pegasusq settings (for better performance) -# switch to more conservative settings after bootup is complete - write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_1_1 500000 - write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_2_0 500000 - write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_2_1 700000 - write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_3_0 700000 - write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_3_1 900000 - write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_4_0 900000 - write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_1_1 150 - write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_2_0 150 - write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_2_1 250 - write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_3_0 250 - write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_3_1 350 - write /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_4_0 450 - write /sys/devices/system/cpu/cpufreq/pegasusq/up_threshold 90 - write /sys/devices/system/cpu/cpufreq/pegasusq/cpu_down_rate 10 - write /sys/devices/system/cpu/cpufreq/pegasusq/down_differential 3 -- cgit v1.1 From ddc02ec2b3d19e301c4cb761b778f43ceff9f8ad Mon Sep 17 00:00:00 2001 From: Simon Shields Date: Wed, 2 Mar 2016 23:26:16 +1100 Subject: i9300: tweak f2fs config Change-Id: I48e23ddb012769efce1251716763a5b94e51a5d8 --- rootdir/fstab.smdk4x12 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rootdir') diff --git a/rootdir/fstab.smdk4x12 b/rootdir/fstab.smdk4x12 index 878876e..8c2e87d 100644 --- a/rootdir/fstab.smdk4x12 +++ b/rootdir/fstab.smdk4x12 @@ -4,10 +4,10 @@ # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK /dev/block/mmcblk0p3 /efs ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait /dev/block/mmcblk0p9 /system ext4 ro,noatime wait -/dev/block/mmcblk0p8 /cache f2fs noatime,nosuid,nodev wait +/dev/block/mmcblk0p8 /cache f2fs noatime,discard,inline_xattr,inline_data,nosuid,nodev wait /dev/block/mmcblk0p8 /cache ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait /dev/block/mmcblk0p10 /preload ext4 noatime,nosuid,nodev,journal_async_commit wait -/dev/block/mmcblk0p12 /data f2fs noatime,nosuid,nodev wait,check,encryptable=footer +/dev/block/mmcblk0p12 /data f2fs noatime,discard,inline_xattr,inline_data,nosuid,nodev wait,check,encryptable=footer /dev/block/mmcblk0p12 /data ext4 noatime,nosuid,nodev,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer # vold-managed volumes ("block device" is actually a sysfs devpath) -- cgit v1.1 From be4c4ec36f214eda40301450cd0691d08719852c Mon Sep 17 00:00:00 2001 From: Simon Shields Date: Sat, 27 Feb 2016 20:37:29 +1100 Subject: i9300: power: pegasusq boosting support implement INTERACTION, LAUNCH_BOOST, and CPU_BOOST hints. Change-Id: Iac8c84ecb910a72a6de4c81a470c9d2d800ff631 --- rootdir/init.target.rc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'rootdir') diff --git a/rootdir/init.target.rc b/rootdir/init.target.rc index a9a3168..d17fc69 100644 --- a/rootdir/init.target.rc +++ b/rootdir/init.target.rc @@ -3,6 +3,9 @@ on init # ko files for FM Radio insmod /system/lib/modules/Si4709_driver.ko chown system system /sys/devices/system/cpu/cpufreq/pegasusq + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/boost_freq + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/boost_lock_time + chown system system /sys/devices/system/cpu/cpufreq/pegasusq/boost_mincpus chown system system /sys/devices/system/cpu/cpufreq/pegasusq/cpu_down_freq chown system system /sys/devices/system/cpu/cpufreq/pegasusq/cpu_down_rate chown system system /sys/devices/system/cpu/cpufreq/pegasusq/cpu_up_freq -- cgit v1.1 From 258dde57636ccaf8ec013915fe131aa7803e074a Mon Sep 17 00:00:00 2001 From: Simon Shields Date: Fri, 18 Mar 2016 23:03:14 +1100 Subject: i9300: more memory tweaks some users are seeing OOMs. Enable KSM, bump up zram and be more aggressive about swapping. Some of these values are taken from "Android Memory Tuning": https://01.org/android-ia/user-guides/android-memory-tuning-android-5.0-and-5.1 Change-Id: Id950c473a5de29bb0e1e2f0a1d3602ddb982e663 --- rootdir/fstab.smdk4x12 | 2 +- rootdir/init.target.rc | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'rootdir') diff --git a/rootdir/fstab.smdk4x12 b/rootdir/fstab.smdk4x12 index 8c2e87d..ba27ca6 100644 --- a/rootdir/fstab.smdk4x12 +++ b/rootdir/fstab.smdk4x12 @@ -20,4 +20,4 @@ /dev/block/mmcblk0p7 /modem emmc defaults recoveryonly # zram -/dev/block/zram0 none swap defaults zramsize=268435456 +/dev/block/zram0 none swap defaults zramsize=419430400 diff --git a/rootdir/init.target.rc b/rootdir/init.target.rc index d17fc69..5e4890f 100644 --- a/rootdir/init.target.rc +++ b/rootdir/init.target.rc @@ -34,6 +34,22 @@ on init chown system system /sys/devices/system/cpu/cpufreq/pegasusq/max_cpu_lock chown system system /sys/devices/system/cpu/cpufreq/pegasusq/sampling_rate +on boot + # Flash storage isn't a good entropy source, and only causes + # locking overhead in the kernel. Turn it off. + write /sys/block/mmcblk0/queue/add_random 0 + write /sys/block/mmcblk1/queue/add_random 0 + + # KSM + write /sys/kernel/mm/ksm/deferred_timer 1 + write /sys/kernel/mm/ksm/pages_to_scan 100 + write /sys/kernel/mm/ksm/sleep_millisecs 500 + write /sys/kernel/mm/ksm/run 1 + + # Swapping 1 page at a time is ok + write /proc/sys/vm/page-cluster 0 + + write /proc/sys/vm/swappiness 100 -- cgit v1.1 From 169608c87e18267ce9f5fd7fc12a754def1fda43 Mon Sep 17 00:00:00 2001 From: Simon Shields Date: Tue, 22 Mar 2016 22:05:57 +1100 Subject: i9300: disable ksm * this seems to exacerbate certain issues with HW video en/decoding * disable it to see if things improve Change-Id: Ibacc7dc99c217832b56a47a738d57882997d8da0 --- rootdir/init.target.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rootdir') diff --git a/rootdir/init.target.rc b/rootdir/init.target.rc index 5e4890f..d7494ac 100644 --- a/rootdir/init.target.rc +++ b/rootdir/init.target.rc @@ -44,7 +44,7 @@ on boot write /sys/kernel/mm/ksm/deferred_timer 1 write /sys/kernel/mm/ksm/pages_to_scan 100 write /sys/kernel/mm/ksm/sleep_millisecs 500 - write /sys/kernel/mm/ksm/run 1 + write /sys/kernel/mm/ksm/run 0 # Swapping 1 page at a time is ok write /proc/sys/vm/page-cluster 0 -- cgit v1.1 From 474b2c14ad9f3ee7f3063354d952d32d3d86e7f0 Mon Sep 17 00:00:00 2001 From: Ziyan Date: Fri, 8 Jan 2016 17:57:59 +0100 Subject: init: increase read-ahead value to 256 kb Apps and database file sizes have increased in recent Android versions, which makes it practical to increase our read-ahead value from 128 kb. General user experience seem to have improved a bit. Change-Id: I35788444a8552a8f376c699ead163e951ed06b30 --- rootdir/init.target.rc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rootdir') diff --git a/rootdir/init.target.rc b/rootdir/init.target.rc index d7494ac..55c7369 100644 --- a/rootdir/init.target.rc +++ b/rootdir/init.target.rc @@ -51,7 +51,8 @@ on boot write /proc/sys/vm/swappiness 100 - + # increase read-ahead value to 256 kb + write /sys/block/mmcblk0/queue/read_ahead_kb 256 on post-fs-data # icd -- cgit v1.1 From d04b5650aa7fcf9999c7c62b477f231a3d3534d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20M=C4=83ce=C8=99?= Date: Sun, 6 Dec 2015 13:04:34 -0500 Subject: Use 2 zRAM compression streams (now that our driver can) Change-Id: I84f26a40e5b89d100b5a1fd2eab1ba59e5957750 --- rootdir/fstab.smdk4x12 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rootdir') diff --git a/rootdir/fstab.smdk4x12 b/rootdir/fstab.smdk4x12 index ba27ca6..6c86c30 100644 --- a/rootdir/fstab.smdk4x12 +++ b/rootdir/fstab.smdk4x12 @@ -20,4 +20,4 @@ /dev/block/mmcblk0p7 /modem emmc defaults recoveryonly # zram -/dev/block/zram0 none swap defaults zramsize=419430400 +/dev/block/zram0 none swap defaults zramsize=419430400,zramstreams=2 -- cgit v1.1 From 25eedce86d2723b23b6fc21dece20540f7ec68c0 Mon Sep 17 00:00:00 2001 From: Simon Shields Date: Sat, 3 Dec 2016 15:39:49 +1100 Subject: i9300: use OTA as misc seems unused Change-Id: Ifa9fbf490e7af4791796c285511b4fac51208115 (cherry picked from commit f64986b2dbf2b0c01a961ff9343e750c6120b9ca) --- rootdir/fstab.smdk4x12 | 1 + 1 file changed, 1 insertion(+) (limited to 'rootdir') diff --git a/rootdir/fstab.smdk4x12 b/rootdir/fstab.smdk4x12 index 6c86c30..dba5118 100644 --- a/rootdir/fstab.smdk4x12 +++ b/rootdir/fstab.smdk4x12 @@ -9,6 +9,7 @@ /dev/block/mmcblk0p10 /preload ext4 noatime,nosuid,nodev,journal_async_commit wait /dev/block/mmcblk0p12 /data f2fs noatime,discard,inline_xattr,inline_data,nosuid,nodev wait,check,encryptable=footer /dev/block/mmcblk0p12 /data ext4 noatime,nosuid,nodev,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer +/dev/block/platform/dw_mmc/by-name/OTA /misc emmc defaults defaults # vold-managed volumes ("block device" is actually a sysfs devpath) /devices/platform/s3c-sdhci.2/mmc_host/mmc1* /storage/sdcard1 auto defaults voldmanaged=sdcard1:auto,encryptable=userdata -- cgit v1.1