http://defect.opensolaris.org/bz/show_bug.cgi?id=4607

           Summary: migration decision for Idle Processor Group should
                    consider idle C-State
    Classification: Development
           Product: power-mgmt
           Version: unspecified
          Platform: Other
        OS/Version: Solaris
            Status: NEW
          Severity: minor
          Priority: P4
         Component: c-state
        AssignedTo: bill.holler at sun.com
        ReportedBy: bill.holler at sun.com
                CC: tesla-dev at opensolaris.org
   Estimated Hours: 0.0


Currently cmt_balance() calls cmt_should_migrate() to determine if the
thread being scheduled should migrate to a different PG.
The CMT_COALESCE policy implemented in cmt_should_migrate() chooses the
PG with maximum utilization that does not exceed capacity.  This
algorithm does not consider the C-States of idle cpus.

A better algorithm could choose the Idle PG with most CPUs in a shallower
idle state.  CPUs in shallower C-States are not saving as much power and
they also have less wakeup latency.  Capacity can easily be used to reflect
the number of idle CPUs and the shallowness of their idle states.
Idle PG COALESCE policy can easily be implemented by setting capacity based
on idle C-State and choosing instead by PG capacity.

Capacity can be set as a weighted sum of the idle C-States of all CPUs in a PG.
The capacity "weight" of each C-State can be chosen such that the capacity
of a PG with a CPU in shallower C-State will always be greater than the
capacity of a PG with all CPUs in deeper C-States (even when the second PG
has more idle CPUs).  This weighted capacity for idle states will create
PG capacities that properly reflect the desirability of scheduling on Idle PG:
  Capacity:
    C1 = NCPU^3
    C2 = NCPU^2
    C3 = NCPU^1
  Utilization:
    C0 = 1

A cmt_capacity field can be added to pg_cmt_t.  CPUs can attomically
add or subtract their weight from their Idle PG cmt_capacity when they go
idle or wakeup.

A new dispatcher policy can be defined for Idle Coalesce instead of
using CMT_COALESCE (which is for Active Power States).  Perhaps
CMT_CAPACITY?

cmt_should_migrate() could compare cmt_capacity in the Idle PG CMT_CAPACITY 
case.

-- 
Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Reply via email to