Thomas De Schampheleire wrote: > 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 > > > ------------------------------------------------------------------------ > > _______________________________________________ > laptop-discuss mailing list > laptop-discuss at opensolaris.org
The cpu_online/offline routines have nothing to do with power management. These routines are used to disable CPUs that appear to be developing faults, or need to be disabled for benchmarking purposes. Note that Solaris halts idle cpus anyway. This might be better discussed in opensolaris-code.... - Bart -- Bart Smaalders Solaris Kernel Performance barts at cyber.eng.sun.com http://blogs.sun.com/barts
