Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125382
b: refs/heads/master
c: 100fdae
h: refs/heads/master
v: v3
  • Loading branch information
Vaidyanathan Srinivasan authored and Ingo Molnar committed Dec 19, 2008
1 parent ad9f8a4 commit 95f9d8e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad273b32e482cdef306eac32b28d97f513a022f4
refs/heads/master: 100fdaee70ebf5f31b9451fbc01300c627091328
13 changes: 13 additions & 0 deletions trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,19 @@ static inline int sd_balance_for_package_power(void)
return 0;
}

/*
* Optimise SD flags for power savings:
* SD_BALANCE_NEWIDLE helps agressive task consolidation and power savings.
* Keep default SD flags if sched_{smt,mc}_power_saving=0
*/

static inline int sd_power_saving_flags(void)
{
if (sched_mc_power_savings | sched_smt_power_savings)
return SD_BALANCE_NEWIDLE;

return 0;
}

struct sched_group {
struct sched_group *next; /* Must be a circular list */
Expand Down
6 changes: 4 additions & 2 deletions trunk/include/linux/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ int arch_update_cpu_topology(void);
| SD_WAKE_AFFINE \
| SD_WAKE_BALANCE \
| SD_SHARE_PKG_RESOURCES\
| sd_balance_for_mc_power(),\
| sd_balance_for_mc_power()\
| sd_power_saving_flags(),\
.last_balance = jiffies, \
.balance_interval = 1, \
}
Expand All @@ -150,7 +151,8 @@ int arch_update_cpu_topology(void);
| SD_BALANCE_FORK \
| SD_WAKE_AFFINE \
| SD_WAKE_BALANCE \
| sd_balance_for_package_power(),\
| sd_balance_for_package_power()\
| sd_power_saving_flags(),\
.last_balance = jiffies, \
.balance_interval = 1, \
}
Expand Down

0 comments on commit 95f9d8e

Please sign in to comment.