Hi,

In cpu_offline() within uts/common/os/disp.c, there is a check on whether
this is the last online :

   1232          * Don't offline last online CPU in partition
   1233          */
   1234         *if* (ncpus_online
<http://src.opensolaris.org/source/s?defs=ncpus_online> <= 1 || pp
<http://src.opensolaris.org/source/s?defs=pp>->cp_ncpus
<http://src.opensolaris.org/source/s?defs=cp_ncpus> <= 1 ||
cpu_intr_count <http://src.opensolaris.org/source/s?defs=cpu_intr_count>(cp
<http://src.opensolaris.org/source/s?defs=cp>) < 2)
   1235                 *return* (EBUSY 
<http://src.opensolaris.org/source/s?defs=EBUSY>);



I am wondering why this check is actually there. If the last cpu can be
offlined as well, then more energy can be saved.

My first thoughts are that this is necessary in order to resume again when
there is something to do. If none of the processors is online, who will
execute the cpu_online() function. This would imply a certain wakeup
interrupt that will wakeup a processor and starting its instructions at the
cpu_online()  function. This should be supported by hardware, which it
probably isn't. Is this correct?

Are there other reasons?

Thanks, Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.opensolaris.org/pipermail/laptop-discuss/attachments/20070508/094a45ed/attachment.html>

Reply via email to