1. DroidForums.net is currently undergoing a major software upgrade. If you are experiencing any problems logging in please: Contact Us

10-slot kernel

Discussion in 'Raidzero' started by slagar, Mar 16, 2011.

  1. slagar
    Offline

    slagar New Member

    Joined:
    Jun 13, 2010
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    0
    Hi Raid, I highly enjoy your kernels while using PE 4.2 and I was curious to know if you'd be willing to make a 10 slot kernel? I've heard in the past people have had troubles with these, but does that mean no one can run these? Anyways if you feel like it I thought 125, 250, 400, 500, 600, 700, 800, 900, 1000, 1100mhz would be sweet (lv of course)

    Thanks for reading!

    Sent from my Droid using DroidForums App
  2. sonicfreak360
    Offline

    sonicfreak360 New Member

    Joined:
    Aug 19, 2010
    Messages:
    534
    Likes Received:
    0
    Trophy Points:
    0
    I have been wanting to try that for a while, but it may not be very helpful for a lot of people. I don't have setcpu, but I won't use it anyway... But I DO wanna try my phone to see how kernel capable my Droid is... sorry that I'm not raidzero :/

    Sent from my Droid using Tapatalk
  3. slagar
    Offline

    slagar New Member

    Joined:
    Jun 13, 2010
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    0
    It's all good anyone who supports my opinion is welcomed by me (not that it matters). Id really just like to test these

    Sent from my Droid using DroidForums App
  4. Zepius
    Offline

    Zepius New Member

    Joined:
    Oct 15, 2010
    Messages:
    285
    Likes Received:
    0
    Trophy Points:
    0
    i thought i remember reading somewhere that the kernels for the d1 can only support 7 slots...
  5. Skull One
    Offline

    Skull One New Member

    Joined:
    Mar 11, 2010
    Messages:
    760
    Likes Received:
    6
    Trophy Points:
    0
    The number of slots for a kernel are only relevant based on the Governor you are using. IE, if you are using ondemand, interactive, performance or power save you only need 3 slots. If you are using conservative, then you can almost justify 7 slots but you really only need 5.

    Going to 10 slots is a complete waste of time under the current kernel code base. The only governor that could even use it is conservative and that is only if you know how to setup the advanced settings correctly.
  6. raidzero
    Offline

    raidzero n00b. Theme Developer Premium Member Developer

    Joined:
    Apr 15, 2010
    Messages:
    1,054
    Likes Received:
    3
    Trophy Points:
    0
    Location:
    Denver, CO
    Like skull says... what's the point? What are you hoping to gain?

    I released my source and scripts. Add some slots ;)

    Sent from my Droid using DroidForums App
  7. slagar
    Offline

    slagar New Member

    Joined:
    Jun 13, 2010
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    0
    I was mostly curious to know if I would experience a smoother transition among voltage and speed therefore increasing battery life. Please forgive my ignorance

    Sent from my Droid using DroidForums App
  8. raidzero
    Offline

    raidzero n00b. Theme Developer Premium Member Developer

    Joined:
    Apr 15, 2010
    Messages:
    1,054
    Likes Received:
    3
    Trophy Points:
    0
    Location:
    Denver, CO
    lol no worries. To me, the more the kernel has to keep up with, the worse the performance and battery life will be. I have always lived by minimalism, and was actually considering making a 3 slot kernel for myself, 125 - 550 - 900.
  9. Skull One
    Offline

    Skull One New Member

    Joined:
    Mar 11, 2010
    Messages:
    760
    Likes Received:
    6
    Trophy Points:
    0
    You pose a very interesting question actually. And there is nothing to forgive. There are tons of things I am ignorant on. :)

    What are the affects of a sudden jump from say 1.0 volts at 250 MHz to 1.6V at 1200 Mhz? And would 10 steps be better to get to that point versus one large leap?

    Lets look at this first from an execution stand point without taking into account the physical side of the electronics.

    I have three applications in memory along with the core parts of the Android OS. One of these applications wakes up for a data sync check. Presently the OS is clocking at 250 Mhz. As the amount of available idle time drops the governor selected determines if a speed increase is warranted. But there are several factors that need to be taken into account for this selection of frequency. How many times a second do you want to do the check for increasing the clock rate? Lets assume that the data sync operation will take 1.2 seconds start to finish. And that most of our apps will take longer than 1 second to finish. So lets check every 100 Milliseconds or 10 times a second. Now we need to decide what are the trip points in idle percentage to start ramping up. Since we need a good example lets do a 10 slot kernel with the frequencies 250, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200. And each step has an appropriate voltage between 1.0 volts and 1.6 volts. Now here is the interesting part of this discussion, only ONE governor has the ability to do the type of ramp up we are discussing, conservative. OnDemand, interactive, performance and powersave basically (IE I am a tad over simplifying this) are at a single trip point to decide how quickly I ramp up. All four of them basically snap from 250Mhz to 1200Mhz at a idle percentage threshold set by the user or from a default. Now conservative on the other hand can ramp in both directions. So lets use it. Now at this point the idle percentage has gone from 95% (basically the OS is just keeping everything alive) to suddenly 50% which means half of the processing time is now in use. 100 milliseconds pass by and we see this new idle percentage and we up the clock rate to 600 Mhz. Another 100 milliseconds pass, idle percentage drops to 30%. We need to give it more power! We ramp to 900 MHz. Now the application is grabbing actual data over the wifi and at the next 100 millisecond check we are at 5% idle. IE we are using 95% of the processing power of the OS. Time to hit 1200 Mhz. Remember we said this was a 1.2 second application run time? We have only 1/4 of the way into it an already at top speed. Now if we had done the checks 30 times a second instead it would have allowed us to ramp up more gradually. Because the governor would have seen the idle % rise at smaller increments. But the overall affect would have still been the same. At 300 milliseconds we are at slot 10 and running at 1200 Mhz. This will continue for another 900 milliseconds until the application finishes and then the idle time will return from the 0 to 5% back up to 95% or so. There is really no way to save power at this point.

    That example is why most governor simply go from lowest slot to highest slot in one big jump once you clear a certain idle percentage. The benefits of a ramp up are usually negated by the very fact that the application runs longer than the actual time frame of the check.

    So about now you have to ask yourself "How the hell do I save battery then"? Well you have to play with the governors advanced settings not the number of slot available. Basically when you have the screen on and you are actively doing something like touching the screen or something is redrawing on the screen, the idle percentage is going to be really low and you are going to want a fast ramp up before the phone seems to lag. But where you can save power is when the phone is displaying a static screen (IE you are reading what has just been presented to you) or you have it in sleep/standby. This is when you want the governor to ramp down as quickly as possible without causing a Yo Yo affect. IE you are ramping down which means the clock rate is slower, which equates to less processing power, which then causes certain background tasks to take longer which then leads to a lower idle percentage which leads to ramping backup all of the sudden. Yes I got a headache from that sentence too. In fact almost every governor has code in it to avoid that condition by doing overlapping averages with 10% or so cutoffs. IE if the last check is close enough to this check don't go up or down because we might have found the right frequency to keep the clock rate low and use less power to accomplish the task.

    And that is the key to saving battery. Finding that point where the amount of background tasks are properly maintained at a certain frequency while you aren't actively doing something with the phone.

    That is why I stated you only need three slots for most of the governors. A 250 Mhz, 550 Mhz, 1200 Mhz would allow the phone to respond to most of the situations properly and maintain a good battery life. The extra slots just allow the conservative governor to really find the "perfect or ideal" balance on the up and down ramps.


    Now you have the oversimplified basics of the OS side.

    What about the electronic side? Well I have good news. I can make this really short.

    The hardware is created to handle its top voltage and frequency and stay there 100% of time as long as proper cooling is provided. Jumping the voltage instantly really doesn't happen in electronics. It takes time, granted it is in a pico to micro second time frame but it is time non-the-less. Plus the battery can't instantly provide more power, it also has to ramp up. So basically you say "more power" and it takes the electrons a few hundred pico seconds to start responding to it. As long as you don't have a heat problem, you are good to go.
  10. sonicfreak360
    Offline

    sonicfreak360 New Member

    Joined:
    Aug 19, 2010
    Messages:
    534
    Likes Received:
    0
    Trophy Points:
    0
    before reading this, my eyeballs just had a melt down!
  11. Skull One
    Offline

    Skull One New Member

    Joined:
    Mar 11, 2010
    Messages:
    760
    Likes Received:
    6
    Trophy Points:
    0
    LOL!!!! Yeah I noticed raidzero went with the simple answer while I was writing up mine.
  12. slagar
    Offline

    slagar New Member

    Joined:
    Jun 13, 2010
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    0
    Thanks for the answer man I really appreciate the long explanation and I understand everything you said. I have many years of experience overclocking desktop cpu's so I was interested to know if these changes would have any effects and now I know. Thanks also to raidzero for replying!

    Sent from my Droid using DroidForums App
Search tags for this page

kernal time slot

,

kernel slots to check data