Skip to content

Commit

Permalink
SLW: Remove stop1_lite and stop2_lite
Browse files Browse the repository at this point in the history
stop1_lite has been removed since it adds no additional benefit
over stop0_lite. stop2_lite has been removed since currently it adds
minimal benefit over stop2. However, the benefit is eclipsed by the time
required to ungate the clocks

Moreover, Lite states don't give up the SMT resources, can potentially
have a performance impact on sibling threads.

Since current OSs (Linux) aren't smart enough to make good decisions
with these stop states, we're (temporarly) removing them from what
we expose to the OS, the idea being to bring them back in a new
DT representation so that only an OS that knows what to do will
do things with them.

Signed-off-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
Reviewed-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
[stewart: add to explanation]
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
(cherry picked from commit 34e9c3c)
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
Over-enthusiastic authored and stewartsmith committed May 28, 2018
1 parent 3efceb1 commit cc52c56
Showing 1 changed file with 8 additions and 28 deletions.
36 changes: 8 additions & 28 deletions hw/slw.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,20 +529,9 @@ static struct cpu_idle_states power9_cpu_idle_states[] = {
| OPAL_PM_PSSCR_ESL \
| OPAL_PM_PSSCR_EC,
.pm_ctrl_reg_mask = OPAL_PM_PSSCR_MASK },
{
.name = "stop1_lite", /* Enter stop1 with no state loss */
.latency_ns = 4900,
.residency_ns = 49000,
.flags = 0*OPAL_PM_DEC_STOP \
| 0*OPAL_PM_TIMEBASE_STOP \
| 0*OPAL_PM_LOSE_USER_CONTEXT \
| 0*OPAL_PM_LOSE_HYP_CONTEXT \
| 0*OPAL_PM_LOSE_FULL_CONTEXT \
| 1*OPAL_PM_STOP_INST_FAST,
.pm_ctrl_reg_val = OPAL_PM_PSSCR_RL(1) \
| OPAL_PM_PSSCR_MTL(3) \
| OPAL_PM_PSSCR_TR(3),
.pm_ctrl_reg_mask = OPAL_PM_PSSCR_MASK },

/* stop1_lite has been removed since it adds no additional benefit over stop0_lite */

{
.name = "stop1",
.latency_ns = 5000,
Expand All @@ -559,20 +548,11 @@ static struct cpu_idle_states power9_cpu_idle_states[] = {
| OPAL_PM_PSSCR_ESL \
| OPAL_PM_PSSCR_EC,
.pm_ctrl_reg_mask = OPAL_PM_PSSCR_MASK },
{
.name = "stop2_lite", /* Enter stop2 with no state loss */
.latency_ns = 9900,
.residency_ns = 99000,
.flags = 0*OPAL_PM_DEC_STOP \
| 0*OPAL_PM_TIMEBASE_STOP \
| 0*OPAL_PM_LOSE_USER_CONTEXT \
| 0*OPAL_PM_LOSE_HYP_CONTEXT \
| 0*OPAL_PM_LOSE_FULL_CONTEXT \
| 1*OPAL_PM_STOP_INST_FAST,
.pm_ctrl_reg_val = OPAL_PM_PSSCR_RL(2) \
| OPAL_PM_PSSCR_MTL(3) \
| OPAL_PM_PSSCR_TR(3),
.pm_ctrl_reg_mask = OPAL_PM_PSSCR_MASK },
/*
* stop2_lite has been removed since currently it adds minimal benefit over stop2.
* However, the benefit is eclipsed by the time required to ungate the clocks
*/

{
.name = "stop2",
.latency_ns = 10000,
Expand Down

0 comments on commit cc52c56

Please sign in to comment.