Cpuidle rapidshare




















Second, if the governor is expecting a non-timer wakeup within the tick range, stopping the tick is not necessary and it may even be harmful. Namely, in that case the governor will select an idle state with the target residency within the time until the expected wakeup, so that state is going to be relatively shallow.

The governor really cannot select a deep idle state then, as that would contradict its own expectation of a wakeup in short order. Now, if the wakeup really occurs shortly, stopping the tick would be a waste of time and in this case the timer hardware would need to be reprogrammed, which is expensive.

On the other hand, if the tick is stopped and the wakeup does not occur any time soon, the hardware may spend indefinite amount of time in the shallow idle state selected by the governor, which will be a waste of energy. Hence, if the governor is expecting a wakeup of any kind within the tick range, it is better to allow the tick trigger. Otherwise, however, the governor will select a relatively deep idle state, so the tick should be stopped so that it does not wake up the CPU too early.

In any case, the governor knows what it is expecting and the decision on whether or not to stop the scheduler tick belongs to it. Still, if the tick has been stopped already in one of the previous iterations of the loop , it is better to leave it as is and the governor needs to take that into account.

The kernel can be configured to disable stopping the scheduler tick in the idle loop altogether. The systems that run kernels configured to allow the scheduler tick to be stopped on idle CPUs are referred to as tickless systems and they are generally regarded as more energy-efficient than the systems running kernels in which the tick cannot be stopped.

If the given system is tickless, it will use the menu governor by default and if it is not tickless, the default CPUIdle governor on it will be ladder. The menu governor is the default CPUIdle governor for tickless systems. It is quite complex, but the basic principle of its design is straightforward. Namely, when invoked to select an idle state for a CPU i. It first obtains the time until the closest timer event with the assumption that the scheduler tick will be stopped.

That time, referred to as the sleep length in what follows, is the upper bound on the time before the next CPU wakeup. It is used to determine the sleep length range, which in turn is needed to get the sleep length correction factor. The menu governor maintains two arrays of sleep length correction factors.

Each array contains several correction factor values that correspond to different sleep length ranges organized so that each range represented in the array is approximately 10 times wider than the previous one. The correction factor for the given sleep length range determined before selecting the idle state for the CPU is updated after the CPU has been woken up and the closer the sleep length is to the observed idle duration, the closer to 1 the correction factor becomes it must fall between 0 and 1 inclusive.

The sleep length is multiplied by the correction factor for the range that it falls into to obtain the first approximation of the predicted idle duration.

Next, the governor uses a simple pattern recognition algorithm to refine its idle duration prediction. Namely, it saves the last 8 observed idle duration values and, when predicting the idle duration next time, it computes the average and variance of them. Otherwise, the longest of the saved observed idle duration values is discarded and the computation is repeated for the remaining ones.

It uses the observation that if the exit latency of the selected idle state is comparable with the predicted idle duration, the total time spent in that state probably will be very short and the amount of energy to save by entering it will be relatively small, so likely it is better to avoid the overhead related to entering that state and exiting it.

Thus selecting a shallower state is likely to be a better option then. Now, the governor is ready to walk the list of idle states and choose one of them. For this purpose, it compares the target residency of each state with the predicted idle duration and the exit latency of it with the computed latency limit. It selects the state with the target residency closest to the predicted idle duration, but still below it, and exit latency that does not exceed the limit. In the final step the governor may still need to refine the idle state selection if it has not decided to stop the scheduler tick.

That happens if the idle duration predicted by it is less than the tick period and the tick has not been stopped already in a previous iteration of the idle loop. Then, the sleep length used in the previous computations may not reflect the real time until the closest timer event and if it really is greater than that time, the governor may need to select a shallower state with a suitable target residency.

It follows the same basic strategy as the menu one : it always tries to find the deepest idle state suitable for the given conditions. However, it applies a different approach to that problem.

The idea of this governor is based on the observation that on many systems timer events are two or more orders of magnitude more frequent than any other interrupts, so they are likely to be the most significant cause of CPU wakeups from idle states.

Moreover, information about what happened in the relatively recent past can be used to estimate whether or not the deepest idle state with target residency within the known time till the closest timer event, referred to as the sleep length, is likely to be suitable for the upcoming CPU idle period and, if not, then which of the shallower idle states to choose instead of it.

Of course, non-timer wakeup sources are more important in some use cases which can be covered by taking a few most recent idle time intervals of the CPU into account. When no threads are eligible to be executed e. Most modern CPUs have more than one idle state: deeper idle states use less power but also require more time to resume from. Note that idle transitions are relatively fast and cheap, a CPU can enter and leave idle states hundreds of times in a second.

Idle-ness must not be confused with full device suspend, which is a stronger and more invasive power saving state See below. CPUs can be idle even when the screen is on and the device looks operational. At the trace level, the idle state 0 means not-idle, values greater than 0 represent increasingly deeper power saving states e.

It is not unusual to see only one idle state in traces collected through USB. Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

Analytics Analytics. Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.

Advertisement Advertisement. Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads. Others Others. Multiple drives in a PC can also provide added protection from disastrous hard drive failures by mirroring all data among two or more drives.

This configuration is known as RAID 1. RAID 5 and 10 provide additional reliability by mirroring all data among three and four drives respectively. The clone can also be mounted as a read-only volume to allow a user to recover individual files.



0コメント

  • 1000 / 1000