Donnerstag, 11. Juni 2015

Nexus 6: ZEN or mako?

It seems to be the question of the week. I'll try to explain the differences in this post and how they can affect battery life.

ZEN uses zen decision hotplug. ZEN only onlines all cores on screen on, it also takes thermal events into account and wont online any core back, if you're under 15% battery, or currently have a thermal event, because of heat. So in the end it isn't a "real" hotplug driver, because it doesnt have any code for active hot plugging in it. That means you cant change its behavior.

mako uses mako hotplug. The mako kernel also comes with an all cores online setup, but you can change it to dual core on light tasks and quadcore for heavy tasks, if you higher the "load_threshold" from "0" to "80" for example.

So does that mean ZEN is for performance and mako for battery? There's no "real" answer to this question. You have to think about some points here:
Every time a core gets kicked in, there have some calculations to be made, which needs battery. Onlining a core also needs some battery every time. You're using your device and cores are getting kicked in and out, because you have some more idle phase and some more heavy load phase. It can also happen that the hotplug thinks its an idle phase right now, offlines cores and the governor has to higher the frequencies of the left cores to handle the load. After some time all cores are coming back and the frequency falls again. In the end it would've been more efficient to have all cores online during that period, because the load could've been handled with lower frequencies between all cores. Remember: All four cores online on a lower frequency is always better than having two cores online in high frequencies.

Remember also that even if all cores are online, it doesnt mean a core cant enter a battery saving idle state if it doesnt have anything to do. Online doesnt mean the core is active the whole time, it just doesnt get kicked out, which in the end is best for low latencies. The higher the idle state, the more time it needs to get active again. But its always faster than getting kicked out.

There's much misinformation about that setup in general. All cores online all the time can save some battery, because there are no calculations and onlining/offlining, which is a battery draining factor. In the end it depends on your usage, which setup is better for you. In some cases active hotplugging is the better choice, in some cases its better to run all cores without any active hotplug. YOU have to test, which suits YOU better.

UPDATE 09/12/15

Since I rebased my kernel, we are now able to switch between mako and ZEN in one kernel, by disabling the one and enabling the other.

Keine Kommentare:

Kommentar veröffentlichen