📜 ⬆️ ⬇️

System-level optimization and its contribution to solving the problems of energy consumption


How the problems of energy consumption are solved at the design stage of microprocessors was described in the series of posts Life in the era of“ dark ”silicon . Four main approaches were covered, but there is another approach, which will be discussed at this time. This is system level optimization.

The first question that naturally arises is why the system-level? The answer is extremely simple - the value of the final product, and not the "cogs" of which it consists. A systematic look at a bundle of software stack + hardware platform + semiconductor components is needed in order to evaluate and manage the characteristics of the final product.

This is true in the case of energy consumption: an integrated approach opens up new opportunities for optimization and allows us to solve otherwise unsolvable problems. In this post I will give a few examples to show that this is true.

big.LITTLE


This idea is to combine two processors within one system. One - to solve high-performance tasks, and the other - for less power consumption where you do not need more performance. Accordingly, if you transfer calculations from one processor to another when the load changes, you can achieve energy savings.
Developers from ARM thus combined processors Cortex-A7 and Cortex-A15. These processors are almost identical in terms of the instruction system architecture, the memory model, and the program model. Accordingly, all instructions will be executed uniformly, although with different performance.
Differences become noticeable at the level of the microarchitecture. Cortex-A7 is an in-order processor, with a long conveyor of 8-10 steps. And the Cortex-A15 is an out-of-order processor, the pipeline of which has from 15 to 24 steps (depending on the instructions).

big.LITTLE system

The power consumption of such a system is shown in the following graph. As can be seen, in the field of low-performance computing, the use of the A7 gives about a twofold gain in energy consumption compared to the A15.

Performance big.LITTLE system
')
And what have the system-level? The fact is that, acting on one level, nothing like this would have happened. It is necessary to pay attention to three levels at once:
- Used processors must provide an appropriate choice between performance and energy efficiency, as well as the identity of the software model.
- The hardware platform must ensure proper interaction between these two processors.
- System software should ensure the migration of computing from one processor to another, solving all related tasks. In addition, the A7 and A15 are almost identical in terms of the program model, but not 100%. These differences need to be hidden from the upper levels of the operating system and the programs being run.

Using processors that do not have as strong an identity as the A7 and A15 could be much more attractive in terms of energy savings. For example, if one processor implements some extensions of the instruction set, and the other does not, or if the processors generally have different instruction sets and memory models. But this puts even more tasks in front of the program level related to the migration of computations, some of which currently do not have a good solution.

Android Power Management Stack


The subject is presented in the following figure. At the bottom are hardware-based power management and firmware hardware implemented by the PCU (Package Control Unit). The following is the software part related to the Linux kernel and the Android environment and, in fact, custom applications. What could be achieved in terms of energy savings if each developer did not look beyond his stack level? For example, if Intel paid attention only to that part of power management that relates to silicon and firmware, ignoring the rest? The processor would definitely not fail due to overheating :), but I would not guarantee anything more. Even if at the hardware level, management is implemented flawlessly, but the software part is rather mediocre, then you can forget about good performance. That is why a lot of effort is spent on improving the entire stack as a whole.


System-level power delivery


Here our attention is attracted by the fact that the power supply system in mobile platforms (for example, smartphones) by itself consumes a lot of energy (20-40%). Moreover, the power consumption of the processor is not dominant in the system. In such circumstances, energy optimization should be performed at the system level. For example, the choice of the optimal frequency for the processor should be carried out with an eye to the power consumption of the other components of the system.



Consider this example. Suppose the current processor load is significantly lower than the maximum. In this situation, there are two behaviors. The first is to quickly (at high frequency and with more power consumed by the processor) perform calculations and go into sleep mode for a long time. The second is slowly (spending less energy per unit of time by the processor) to perform calculations and go into sleep mode for much less time. Which option to choose? This is not at all easy, and for this you need to know how much other components of the system consume in various modes.


The temperature estimation and management


For mobile devices such as tablets or smartphones, there are a number of specific requirements in terms of temperature. Namely, the temperature of the case and the screen should not cause unpleasant sensations when touched. However, this problem is not at all as simple as it seems, due to the complex nature of the distribution of heat in time and space of the case, as well as the limitations of temperature sensors - it will not be possible to place the temperature sensor directly on the surface of the case or screen. As a result, developers are forced to build models describing the temperature at various points on the surface of the case and calibrate them / train them / etc. And on the basis of these models, then implement energy management algorithms. Of course, this can be done only with a ready-made smartphone / tablet, i.e. at the system level.


In conclusion, I want to say that optimization at the system level has become a really necessary thing. Its advantage is obvious and a number of problems cannot be solved otherwise. And since in terms of energy consumption, it was noticed relatively recently, that is, there is reason to believe that there will still be many interesting achievements in this direction.

Source: https://habr.com/ru/post/161899/


All Articles