diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-05-09 23:28:57 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-05-09 23:28:57 -0700 |
| commit | df65cdbf6bc82e79658c35e14221fef34f4db6d0 (patch) | |
| tree | a185df2a8a533d5d6fa83c002c82b4ff1c3e4dee /include | |
| parent | 237eaf03e4264e7171de2c993c6ad94f30f64a2d (diff) | |
[PATCH] sched: passive balancing damping
From: Nick Piggin <nickpiggin@yahoo.com.au>
This patch starts to balance woken processes when half the relevant domain's
imbalance_pct is reached. Previously balancing would start after a small,
constant difference in waker/wakee runqueue loads was reached, which would
cause too much process movement when there are lots of processes running.
It also turns wake balancing into a domain flag while previously it was always
on. Now sched domains can "soft partition" an SMP system without using
processor affinities.
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/sched.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index e47ff84b4761..1ff71bf1f5ea 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -549,7 +549,8 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0) #define SD_BALANCE_EXEC 2 /* Balance on exec */ #define SD_WAKE_IDLE 4 /* Wake to idle CPU on task wakeup */ #define SD_WAKE_AFFINE 8 /* Wake task to waking CPU */ -#define SD_SHARE_CPUPOWER 16 /* Domain members share cpu power */ +#define SD_WAKE_BALANCE 16 /* Perform balancing at task wakeup */ +#define SD_SHARE_CPUPOWER 32 /* Domain members share cpu power */ struct sched_group { struct sched_group *next; /* Must be a circular list */ @@ -618,7 +619,8 @@ struct sched_domain { .cache_nice_tries = 1, \ .per_cpu_gain = 100, \ .flags = SD_BALANCE_NEWIDLE \ - | SD_WAKE_AFFINE, \ + | SD_WAKE_AFFINE \ + | SD_WAKE_BALANCE, \ .last_balance = jiffies, \ .balance_interval = 1, \ .nr_balance_failed = 0, \ @@ -637,7 +639,8 @@ struct sched_domain { .cache_hot_time = (10*1000000), \ .cache_nice_tries = 1, \ .per_cpu_gain = 100, \ - .flags = SD_BALANCE_EXEC, \ + .flags = SD_BALANCE_EXEC \ + | SD_WAKE_BALANCE, \ .last_balance = jiffies, \ .balance_interval = 1, \ .nr_balance_failed = 0, \ |
