sched: convert BALANCE_FOR_xx_POWER to inline functions
Impact: cleanup BALANCE_FOR_MC_POWER and similar macros defined in sched.h are not constants and have various condition checks and significant amount of code that is not suitable to be contain in a macro. Also there could be side effects on the expressions passed to some of them like test_sd_parent(). This patch converts all complex macros related to power savings balance to inline functions. Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:

committed by
Ingo Molnar

parent
3b11ce7f54
commit
716707b299
@@ -125,7 +125,7 @@ int arch_update_cpu_topology(void);
|
||||
| SD_WAKE_AFFINE \
|
||||
| SD_WAKE_BALANCE \
|
||||
| SD_SHARE_PKG_RESOURCES\
|
||||
| BALANCE_FOR_MC_POWER, \
|
||||
| sd_balance_for_mc_power(),\
|
||||
.last_balance = jiffies, \
|
||||
.balance_interval = 1, \
|
||||
}
|
||||
@@ -150,7 +150,7 @@ int arch_update_cpu_topology(void);
|
||||
| SD_BALANCE_FORK \
|
||||
| SD_WAKE_AFFINE \
|
||||
| SD_WAKE_BALANCE \
|
||||
| BALANCE_FOR_PKG_POWER,\
|
||||
| sd_balance_for_package_power(),\
|
||||
.last_balance = jiffies, \
|
||||
.balance_interval = 1, \
|
||||
}
|
||||
|
Reference in New Issue
Block a user