Visualizzazione stampabile
-
[Info] PegasusQ Governor
Visto che da alcuni mesi il creatore del kernel Siyah ha prediletto per le impostazioni standard della sua creazione il governor PegasusQ, vorrei fornire qualche informazione tecnica e dettagliata che possa spiegarne meglio la logica di funzionamento.
Le prime informazioni che ho trovato in rete sono queste:
- E' un governor che si accosta molto alla logica di funzionamento di Ondemand (fonte XDA)
- E' un governor proposto da Samsung per ottimizzare la gestione dei quadcore come l'S3, ripreso, ottimizzato e adattato da Gokhanmoral alla logica dualcore dell'S2 (fonte XDA)
- Permette ai vari core di lavorare a frequenze asincrone.
Quindi se il primo core è a 1400, il secondo può essere anche a 800.
In pratica consuma meno in quanto negli altri governor, quando si attiva il secondo core, questo viene impostato sempre alla stessa frequenza (a 1200 l'altro core lavora sempre a 1200)
- è il governor che usa il Galaxy S3
Poi finalmente mi sono imbattuto in una analisi completa eseguita dall'esperto droidphile, che riporto in originale sul secondo post
xda-developers - View Single Post - [REF][ICS] Kernel Stuffs - How is ICS Kernel Different | updated may-28-2012
Tra qualche giorno provvederò, dopo essermi studiata meglio la guida, a proporre una rivisitazione quanto più possibile semplificata e, spero, chiara.
A presto.
-
http://forum.xda-developers.com/show...03&postcount=3
Pegasusq Governor
Let's see what is pegasusq governor which claims to be a multi core aware governor.
Some Basics to Remember Before Reading On:
Some patience is required to understand a governor.
Pegasusq is basically an ondemand based governor which also controls hotplugging.
Run Queue: We know mutiple processes can run at once on our device. These active processes are placed in an array called a run queue along with their priority values. (Priority is used by the task scheduler to determine which process is to run next) To ensure each process has a fair share of resources, each one is run for some time period then paused and placed back into the run queue. When a program is stopped to let another run - the program with the highest priority in the run queue is then allowed to execute.
Talking w.r.t to Android O.S and GS2 CPU, each core is given a run queue, which maintains both an active and expired array of processes. The scheduler selects the next process from the active array with highest priority. When a process' time period expires, it is placed into the expired array with some priority. When the active array contains no more processes, the scheduler swaps the active and expired arrays.
Wall Time is the total up time of CPU. Idle Time is the total idle time of the CPU. The difference (wall time-idle time) gives you the CPU Busy Time. And load on CPU is calculated as percentage of Busy Time on Up Time. (Doesn't it make a lot of sense)
Governor doesn't scale CPU but tells the CPU driver to do so.
Sampling means to evaluate load.
Smooth scaling is also done by CPU driver, not by governor.
Switching to pegasusq will deactivate Stand Hotplug since the governor's hotpluggging logic can conflict with that.
Switching to a different governor from Stand hotplug will re-activate Stand Hotplug since you need a logic to control hotplugging.
Use scripts or SetCpu to change tunables.
Gokhanmoral modified pegasusq (originally authored by Samsung for quad core devices) in Siyah kernel to be dual core friendly.
1) sampling_rate - Measured in uS and actual meaning being Sampling Interval, this factor is used to determine how often the governor should poll for CPU usage in terms of frequency and load percentage to make scaling decisions - either scale CPU Up or scale it Down.
2) up_threshold - Measured as percentage, this is the load on CPU at which governor scales CPU Up. Lower value - early scale up, and viceversa.
3) sampling_down_factor - Acts as a mutiplier to sampling interval for re-evaluating the load when CPU is truly busy and is on highest clock frequency (policy max). Setting to 1 makes no difference and causes CPU to immediately scale down from highest frequency. Sampling down factor is not valid for lower frequencies and low load conditions. Note that CPU is scaled up to max frequency when max_load_freq is greater than up_threshold*current frequency. Max_load_freq is an arbitory frequency calculated as the maximum of load_frequencies. Load_frequency is an arbitrary frequency which describes the frequency the device theoretically needs to handle 100% load, calculated as load*average_frequency.
4) down_differential - After spending sampling_down_factor*sampling_rate micro seconds at maximum frequency on high load, governor samples the load again to calculate an approx target frequency to scale-down-to which should not trigger up_threshold in the next sample. (Triggerin up threshold may cause jumping to max frequency again). Down_differential also act as the factor which prevent agressive scale down. Max_load_freq is checked against (up_threshold - down_differential) * current frequency. If found to be smaller, CPU is scaled down to a target frequency as described above.
5) freq_step - Defines how much as a percentage of maximum frequency, governor should increase CPU frequency each time CPU load reaches up_threshold.
6) cpu_up_rate - No of samples to evaluate load to scale CPU Up. After cpu_up_rate samples are finished for a frequency, CPU scale-Up logic is executed. In other words - before scaling Up, cpu_up_rate*sampling_rate micro seconds are spend at a frequency.
7) cpu_down_rate - No of samples to evaluate load to scale CPU Down. After cpu_down_rate samples are finished for a frequency, CPU scale-Down logic is executed. In other words - before scaling Down, cpu_down_rate*sampling_rate micro seconds are spend at a frequency.
8) hotplug_freq_1_1 - Up threshold frequency to turn second core On, when some other conditions is also met. ie If (minimum frequency greater than or equal to hotplug_freq 1 1 and length of average_runque_minimum greater than hotplug_rq_1_1) Hotplug IN Second Core.
9) hotplug_freq_2_0 - Down threshold frequency to turn second core On, when some other conditions is also met. ie If (maximum frequency less than hotplug_freq 2 0 and length of average_runque__maximum less than or equal to hotplug_rq_2_0) Hotplug OUT Second Core.
10) hotplug_rq_1_1 - Threshold run queue length for second core to turn on.
11) hotplug_rq_2_0 - Threshold run queue length for second core to turn off.
12) ignore_nice_load - Setting to 1 causes governor to ignore load resulted by nice processes while making scaling decisions. Nice processes are the one i/o scheuler refers to as low priority process.
13) io_is_busy - Setting to 1 causes treating i/o wait time as CPU busy time. To imporve performance of heavy applications, set this to 1.
14) max_cpu_lock - Calculated as minimum of (its current value and number of possible cpus). If it has a non-zero value and the value is greater than no of online cores, cancels Hotplugging IN the second core. Leave it as default 0.
15) hotplug_lock - Hotplugging second core is cancelled if it's value is greater than zero. The value should be greater than value of max_cpu_lock. Leave it as 1.
16) cpu_up_freq - Calculated as minimum of (its current value and maximum frequency), this tunable is actually not used by the governor.
17) cpu_down_freq - Calculated as maximum of ( its current value and minimum frequency), this tunable is actually not used by the governor.
18) up_nr_cpus - Calculated as minimum of (its current value and num of possible cpus), this tunable is used by the governor to indirectly make Hotplugging decisions, but may not be useful for a 2 core CPU.
19) dvfs_debug - Set to 1 to enable governor logging. If you're an enthusiast, this may be useful to view the impact of the values for governor tunable set by inspecting the log.
-
-
sono deciso a provarlo x almeno un paio di gg(uso sempre e solo ondemand-sio)
posso mettere queste impostazioni giusto?intendo copiarle x filo e x segno ?governor apparte rotfl
Quote:
RELAXED UnderVolt VALUES
SETTINGS (CPU):
GENTLE_FAIR_SLEEPERS = On
ARCH_POWER = On
CPU Hotplug = Default
CPU IDLE Mode = AFTR + LPA (default)
Smooth Scaling Level = 800Mhz
SCHED_MC = 2
CPU Undervolting = -50mV (if you get reboots or freezes, use -25mV)
CPU Step Count = 18 (All available)
Default CPU Governor = SmartassV2 (Consigliato da Leo2589)
Default CPU Scheduler = sio -> si trova nel menù MISC
Scaling Max Freq = 1000Mhz
Scaling Min Freq = 200Mhz
io di solito SCHED_MC la tengo a = 0 però proverò il 2 come da copione
ho usato il kernel dorimax(stupendo)e ricordo che nel menù del kernel dove si fanno i vari wipe/install ecc ci sono delle impostazioni da scegliere(uno script preinstallato credo o simile)dove in pratica ti "setta" le impostazioni di extweaks in maniera ottimale x salvare la batteria ^^
Ho notato una cosa,anzi 2 il sched_MC a 2 e il GPUStayCounts: a 2 - 2 - 2
che ne dite?
ps. un mille grazie a te illuminato67 x tutto questo ;)
-
Quote:
Originariamente inviato da
illuminato67
Grazie......
normalmente queste domande vanno fatte in sos modding ;) però visto che hai trovato la spiegazione perchè non metti la traduzione al primo post e ti cambio il titolo in [INFO]?
sennò devo chiudere come chiudo tutti i thread di domande non fatte in sos modding
https://www.androidiani.com/forum/mo...e-modding.html
-
-
Ok jaco. Dammi almeno il tempo di tornare a casa ;):)
Peró per una settimana non avró il PC e per la traduzione bisognerà aspettare un pò.
Va bene lo stesso?
PS:
E' anche vero che sta aperto da un paio di mesi ed io stesso avevo chiesto ai mod la chiusura. ;)
Visto che nessuno ha provveduto ho editato la richiesta di chiusura e mi sono limitato a lasciare un laconico grazie
Inviato dal mio S2 con CM9
Inviato dal mio S2 con CM9
-
Quote:
Originariamente inviato da
illuminato67
Ok jaco. Dammi almeno il tempo di tornare a casa ;):)
E' anche vero che sta aperto da un paio di mesi ed io stesso avevo chiesto ai mod la chiusura. ;)
Visto che nessuno ha provveduto ho editato la richiesta di chiusura e mi sono limitato a lasciare un laconico grazie
Inviato dal mio S2 con CM9
ti do tutto il tempo che vuoi, non mi sembra vero ... i tuoi thread sono sempre "illuminati" rotflrotfl
P.S. se lo avevo visto te lo avevo già chiuso ;)
-
Quote:
Originariamente inviato da
jacobrucia
ti do tutto il tempo che vuoi, non mi sembra vero ... i tuoi thread sono sempre "illuminati" rotflrotfl
P.S. se lo avevo visto te lo avevo già chiuso ;)
Ti serve un vicesceriffo :D:D:D:D
Grazie. Dammi una decina di giorni x la traduzione (non avrò il PC).
Nel pomeriggio creo il 3d (che tu correggerai sicuramente:D:D)
Inviato dal mio S2 con CM9
-
Ma é già jaco il vice.. :p
inviato dal mio iPhone 5 Bianco in esclusiva mondiale