본문 바로가기
테그라크 오버클럭

Lulzactive 가버너 v2

by 테그라크 2011. 11. 29.

Lulzactive 가버너 v2

Author: 테그라크
interactive 가버너 소스를 기반으로 수정되었습니다.
erasmux님의 smartass 가버너의 아이디어를 차용하였습니다. (Flykernel에 포함되어 있음)

lulzactive 설정 앱 다운로드
https://market.android.com/details?id=com.tegrak.lulzactive

CPU 사용량 >= [inc_cpu_load]%
클럭이 (Lx) 단계에서 (Lx - pump_up_step) 단계로 상승합니다.
상승 샘플링 타임은 24000us (smartass 가버너와 동일한 값)
예)
(L0)1200 - (L1)1000 - (L2)800 - (L3)500 - (L4)200
inc_cpu_load=60%, pump_up_step=1
cpu_load = 60%, current frequency = (L2)800 >> frequency = (L1)1000
cpu_load = 60%, current frequency = (L1)1000 >> frequency = (L0)1200

(L0)1200 - (L1)1000 - (L2)800 - (L3)500 - (L4)200
inc_cpu_load=50%, pump_up_step=2
cpu_load = 50%, current frequency = (L2)800 >> frequency = (L0)1200
cpu_load = 50%, current frequency = (L4)200>> frequency = (L2)800

CPU 사용량 < [inc_cpu_load]%
클럭이 기존 그대로 유지되거나 (Lx) 단계에서 (Lx + pump_down_step) 단계로 다운됩니다.
다운 샘플링 타임은 49000us (smartass 가버너와 동일한 값)
예)
(L0)1200 - (L1)1000 - (L2)800 - (L3)500 - (L4)200
inc_cpu_load=60%, pump_down_step=1
cpu_load = 59%, current frequency = (L2)800 >> frequency = (L3)500
cpu_load = 23%, current frequency = (L1)1000 >> frequency = (L2)800


스크린 오프
스크린이 꺼지면 최소 동작 클럭으로만 동작하게 됩니다.
갤럭시S2의 기본 최소값은 200MHz, Scaling Min 값으로 조절할 수 있습니다.
SetCPU에서 스크린 오프 프로필을 따로 설정하지 않으셔도 됩니다.
예)
(L0)1200 - (L1)1000 - (L2)800 - (L3)500 - (L4)200
screen_off_min_step=3
(L4)200 ~ (L3)500

screen_off_min_step=1
(L4)200 ~ (L1)1000

Values
아래의 값들은 /sys/devices/system/cpu/cpufreq/lulzactive/ 폴더안에 있습니다.

inc_cpu_load: 10 ~ 100%, 기본값 60%
pump_up_step: 0 ~ (frequency_table_size - 2), 기본값 1
pump_down_step: 0 ~ (frequency_table_size - 2), 기본값 1
screen_off_min_step: 0 ~ (frequency_table_size - 1), 기본값 (frequency_table_size - 2)
up_sample_time: 10,000 ~ 50,000μs, 기본값 24,000μs
down_sample_time: 10,000 ~ 100,000μs, 기본값 49,000μs

디버깅
1 = 스크린 꺼짐/켜짐 메시지 출력
2 = 가버너 시작/중단 메시지 출력
4 = 클럭 변경 메시지 출력
7 = 위의 항목들 모두 출력 (bitwise or, 1|2|4 = 7, 기본값은 1|2 = 3)
echo "7" > /sys/devices/system/cpu/cpufreq/lulzactive/debug_mode
cat /proc/kmsg | busybox grep "lulzactive"

확실히 빨라집니다. 다만 배터리 아끼는건 조금 포기하셔야 할지도 ^^

댓글