13.07.2015 Views

Intel® 64 and IA-32 Architectures Optimization Reference Manual

Intel® 64 and IA-32 Architectures Optimization Reference Manual

Intel® 64 and IA-32 Architectures Optimization Reference Manual

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

POWER OPTIMIZATION FOR MOBILE USAGESOptimizing an application starts with having efficient algorithms <strong>and</strong> then improvingthem using Intel software development tools, such as Intel VTune PerformanceAnalyzers, Intel compilers, <strong>and</strong> Intel Performance Libraries.See Chapter 3 through Chapter 9 for more information about performance optimizationto reduce the time to complete application workloads.10.4.3 Platform-Level <strong>Optimization</strong>sApplications can save power at the platform level by using devices appropriately <strong>and</strong>redistributing the workload. The following techniques do not impact performance <strong>and</strong>may provide additional power conservation:• Read ahead from CD/DVD data <strong>and</strong> cache it in memory or hard disk to allow theDVD drive to stop spinning.• Switch off unused devices.• When developing a network-intensive application, take advantage of opportunitiesto conserve power. For example, switch to LAN from WLAN whenever bothare connected.• Send data over WLAN in large chunks to allow the WiFi card to enter low powermode in between consecutive packets. The saving is based on the fact that afterevery send/receive operation, the WiFi card remains in high power mode for up toseveral seconds, depending on the power saving mode. (Although the purposekeeping the WiFI in high power mode is to enable a quick wake up).• Avoid frequent disk access. Each disk access forces the device to spin up <strong>and</strong> stayin high power mode for some period after the last access. Buffer small disk reads<strong>and</strong> writes to RAM to consolidate disk operations over time. Use the GetDevice-PowerState() Windows API to test disk state <strong>and</strong> delay the disk access if it is notspinning.10.4.4 H<strong>and</strong>ling Sleep State TransitionsIn some cases, transitioning to a sleep state may harm an application. For example,suppose an application is in the middle of using a file on the network when thesystem enters suspend mode. Upon resuming, the network connection may not beavailable <strong>and</strong> information could be lost.An application may improve its behavior in such situations by becoming aware ofsleep state transitions. It can do this by using the WM_POWERBROADCAST message.This message contains all the necessary information for an application to reactappropriately.Here are some examples of an application reaction to sleep mode transitions:• Saving state/data prior to the sleep transition <strong>and</strong> restoring state/data after thewake up transition.10-7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!