Slashdot Mirror


PC Power Management, ACPI Explained In Detail

DK writes "Computer performance has increased steadily in recent years, and unfortunately so has power consumption. An ultimate gaming system equipped with a quad-core processor, two NVIDIA GeForce 8800 Ultra, 4 sticks of DDR2 memory, and a few hard drives can easily consume 500W without doing anything! To reduce power wastage, the industry standards APM and ACPI have been developed to make our computers work more efficiently. ACPI is the successor of APM and is explained in detail in this article."

4 of 133 comments (clear)

  1. ACPI is a disaster by r00t · · Score: 4, Informative

    We used to standardize hardware interfaces. They stood the test of time, were well supported, and were low overhead. Writing drivers, including boot code, was no serious problem. We didn't need an emulator, virtual machine, etc.

    Decent standards: IDE, VGA, PC serial interface, PC parallel interface, PC keyboard interface, UHCI, OHCI, etc.

    Now we standardize an interface to non-standard hardware via ACPI. The OS is supposed to run ACPI code (a script) in a complicated interpreter. ACPI code is slow and buggy, and generally gets to do whatever it wants with the hardware. It's like making BIOS calls to do everything, but without even the minor advantage of native code.

    This is especially painful for boot loaders. You can't run an ACPI interpreter in a 512-byte boot sector. You probably can't do it in any reasonable boot loader.

    This is even painful for power management. For example, OLPC wants to suspend the CPU between every keystroke; that doesn't work so well if you need to run an ACPI code script to do it.

    1. Re:ACPI is a disaster by Bert64 · · Score: 5, Informative

      Whats worse is that...
      There is a standard for these ACPI scripts, as you pointed out it's not great but at least there is one. There's also a compiler for them, written by Intel that complies with the standard.
      But most hardware makers don't use Intel's compiler that complies with standards... They use Microsoft's compiler that completely breaks the standards, thus OS authors can't just implement according to Intel's published standards, they have to reverse engineer Microsoft's unpublished variations.

      --
      http://spamdecoy.net - free throwaway anonymous email - avoid spam!
    2. Re:ACPI is a disaster by *SECADM · · Score: 4, Informative
      The ACPI interpreter is designed to work within the OSPM. The reason being the assumption that the OS will always be the central point that knows the most about the whole system at any given time, and therefore it is most qualified to make power management decisions.

      About your point about standardizing on an abstract interface of non-standardized hardware, consider:
      1. This is nothing new, and is what always happens in the computer industry. If we were so hung up on standardized hardware interfaces that are well understood by the industry, we would still be coding all in x86/68k/ia64 assembly. Thanks to a wonderful high level (read: abstract) language (C/C++) that is standardized so we can write portable code for.
      2. ACPI hasn't replaced any of those hardware standards you mentioned. E.g. ATA drives still take the same commands as before and the standard is constantly evolving. But more importantly, do those hardware standards have the advance power management capabilities offered by ACPI? And, if they do implement it somehow in the hardware spec, how is updating each individual hardware's firmware *and* driver to include the new power management support, better than just updating the firmware AML code to expose the new capabilities to the OS in a standardized way?
      3. You didn't mention the other half of the ACPI standard, the Configuration aspect of the spec. All those hardware interfaces that you know and love used to each expose its own resource requirement differently, unlike ACPI which standardizes resource descriptors and boot-configured requirements. How is supporting a bunch of hardware specific resource description format better than supporting one standardized format that is well understood by the OS?

      Finally, to go back to your OLPC example. First of all I am not sure why you would want to put an ACPI interpreter into the boot loader? Is there a reason OLPC is doing this? As for you implying that you need to run ACPI code to suspend the CPU (after each keystroke), this is just not true. C-states (which i assume you are talking about) are entered by simply reading a register for the state, as described by the _CST definition. So all you need to do is parse the definition once, and remember the corresponding registers and never parse the AML code again. Same for T-states or P-states, which are entered by writing to the proper registers. There is no such running "ACPI script" overhead like you've described when handling processor power management.
      --
      sure I'll have a sig.
  2. Whatever by Anonymous Coward · · Score: 5, Informative

    Noones computer idles at 500 Watts, not even close. I wish people would check their facts before posting nonsense.

    My 4 year old xenon dual processor (Thats two physical CPUs) PC with (~10 fans) with no power management support in the CPUs idles at 200 watts including powering the display and extraneous trinkets attached to the watt meter plugged into my wall.

    All new PCs with multiple cores on single processors have power management features and use concideribly less power when idling.

    Whats worse is the article spouts all kinds of mostly useless techno crap about power states without providing any context into what it means or useful information in terms of actual OS power settings one can configure to do something about their PCs power usage.