Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08c183f3 authored by Christoph Lameter's avatar Christoph Lameter Committed by Linus Torvalds
Browse files

[PATCH] sched: add option to serialize load balancing



Large sched domains can be very expensive to scan.  Add an option SD_SERIALIZE
to the sched domain flags.  If that flag is set then we make sure that no
other such domain is being balanced.

[akpm@osdl.org: build fix]
Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
Cc: Peter Williams <pwil3058@bigpond.net.au>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Acked-by: default avatarIngo Molnar <mingo@elte.hu>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1bd77f2d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ static inline int node_to_first_cpu(int node)
	.flags			= SD_LOAD_BALANCE	\
				| SD_BALANCE_EXEC	\
				| SD_BALANCE_FORK	\
				| SD_SERIALIZE		\
				| SD_WAKE_BALANCE,	\
	.last_balance		= jiffies,		\
	.balance_interval	= 1,			\
+1 −0
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@ void build_cpu_to_node_map(void);
	.flags			= SD_LOAD_BALANCE	\
				| SD_BALANCE_EXEC	\
				| SD_BALANCE_FORK	\
				| SD_SERIALIZE		\
				| SD_WAKE_BALANCE,	\
	.last_balance		= jiffies,		\
	.balance_interval	= 64,			\
+1 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ static inline int pcibus_to_node(struct pci_bus *bus)
				| SD_BALANCE_EXEC	\
				| SD_BALANCE_NEWIDLE	\
				| SD_WAKE_IDLE		\
				| SD_SERIALIZE		\
				| SD_WAKE_BALANCE,	\
	.last_balance		= jiffies,		\
	.balance_interval	= 1,			\
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ extern int __node_distance(int, int);
	.flags			= SD_LOAD_BALANCE	\
				| SD_BALANCE_FORK	\
				| SD_BALANCE_EXEC	\
				| SD_SERIALIZE		\
				| SD_WAKE_BALANCE,	\
	.last_balance		= jiffies,		\
	.balance_interval	= 1,			\
+1 −0
Original line number Diff line number Diff line
@@ -648,6 +648,7 @@ enum idle_type
#define SD_SHARE_CPUPOWER	128	/* Domain members share cpu power */
#define SD_POWERSAVINGS_BALANCE	256	/* Balance for power savings */
#define SD_SHARE_PKG_RESOURCES	512	/* Domain members share cpu pkg resources */
#define SD_SERIALIZE		1024	/* Only a single load balancing instance */

#define BALANCE_FOR_MC_POWER	\
	(sched_smt_power_savings ? SD_POWERSAVINGS_BALANCE : 0)
Loading