What Is Hltmod?


    Hltmod is a loadable kernel module which utilizes the power
saving feature of the x86 'hlt' instruction in an SMP environment
without incurring any significant performance impact.  The most
recent Solaris 8 kernel can only use the 'hlt' instruction in single
CPU applications.  If the same method used for the single CPU
case is extended to a multi-processor system, the low activity
response time suffers greatly resulting in a significant interactive
response time hit.  This arises because threads get scheduled on
processors which are sleeping in the 'hlt' instruction and which may
not be woken up by an interrupt for 100's of milliseconds.  Hltmod
replaces the idle loop in the kernel with a new one which
encorporates an adaptive algorithm which completely eliminates
the performance problem.

    For machines that are mostly idle, the power savings will be
about 20-25 Watts per CPU. For a dual CPU machine operating
24/7, this represents a savings of about $100 per year based on
current  San Jose, Ca. electric rates (your mileage may vary).  As
the average compute load increases, the average power savings
will show a corresponding decrease.  In addition to the lower
operating costs and increased reliability resulting from lower
operating temperatures,  UPS runtimes are increased without
adding more batteries (to help with those pesky rolling blackouts).

    Hltmod has been tested on many dual CPU configurations under
varying load conditions and has not presented any problems.  It has
been tested in server configurations, in desktop configurations,
in networked configurations and in stand alone configurations.  As
configured, Hltmod will work for up to 8 processors and may be
configured to support more.  Hltmod has only been tested for Intel
PII, PIII, and Celeron processors from 300 Mhz to 1 Gc, but will
probably work for other compatible devices.

    If kernel patch 108520-09 has installed and you wish to use the
native version of the 'hlt' code, refer to the source code for additional
instructions.  Hltmod is only known to work under Solaris 8 and the
impact of loading Hltmod into a Solaris 7 kernel is unknown.  The
binary included in the package was compiled with gcc under Solaris 8
and will work with or without the latest kernel patch.

    The modinfo command can be used to see if Hltmod has been
successfully applied to your system.  The name of the module reported
by modinfo will be 'hltmod'.  If you have a UPS, you should be able
to measure the power savings directly.  See the instructions for your
UPS and its operating software for more details.

    The effect of Hltmod on real time scheduling has not been
determined, but it is not expected to be significant.  If anyone
tries Hltmod in an environment where real time scheduling is
important, please let me know the results.

    Report any problems to hltmod@palisad.com, although I can not
guarantee that any specific problem will be fixed.  There is one known
difference between the new idle loop and the original Solaris idle loop,
but it does not appear to have any significant impact.  See the source
code for more details.  If Hltmod were fully integrated into the kernel,
instead of added as a loadable kernel module, this particular difference
would go away.

    Feel free to send mail to hltmod@palisad.com to let me know
whether or not Hltmod is useful to you and to let me know you what
kinds of CPU configurations you are using it on.

    Read the file LICENSE for the licensing terms.  By using Hltmod,
you implicitly agree to the terms of the license.
 
 

                    Installation Instructions


./build     -> This compiles and loads the kernel module and
                     requires that gcc be in your path.  You can modify
                     this script to use other compilers.  If you do not
                     have any compilers installed on your system, this
                     step may be omitted since a precompiled binary for
                     Solaris 8 is included in the release.

./install     -> This installs Hltmod and its startup scripts
                      and starts it up.  This must be run as root.

./uninstall -> This stops Hltmod and removes it and its startup
                      scripts from the system.  This must be run as root.
 

     Copyright (c) 2001 by George White Consulting
                    All Rights Reserved