diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index fdd26fffaa20..b5b350135002 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -2841,16 +2841,10 @@ static void active_load_balance(struct rq *busiest_rq, int busiest_cpu) | |||
2841 | * Balancing parameters are set up in arch_init_sched_domains. | 2841 | * Balancing parameters are set up in arch_init_sched_domains. |
2842 | */ | 2842 | */ |
2843 | 2843 | ||
2844 | /* Don't have all balancing operations going off at once: */ | ||
2845 | static inline unsigned long cpu_offset(int cpu) | ||
2846 | { | ||
2847 | return jiffies + cpu * HZ / NR_CPUS; | ||
2848 | } | ||
2849 | |||
2850 | static void | 2844 | static void |
2851 | rebalance_tick(int this_cpu, struct rq *this_rq, enum idle_type idle) | 2845 | rebalance_tick(int this_cpu, struct rq *this_rq, enum idle_type idle) |
2852 | { | 2846 | { |
2853 | unsigned long this_load, interval, j = cpu_offset(this_cpu); | 2847 | unsigned long this_load, interval; |
2854 | struct sched_domain *sd; | 2848 | struct sched_domain *sd; |
2855 | int i, scale; | 2849 | int i, scale; |
2856 | 2850 | ||
@@ -2885,7 +2879,7 @@ rebalance_tick(int this_cpu, struct rq *this_rq, enum idle_type idle) | |||
2885 | if (unlikely(!interval)) | 2879 | if (unlikely(!interval)) |
2886 | interval = 1; | 2880 | interval = 1; |
2887 | 2881 | ||
2888 | if (j - sd->last_balance >= interval) { | 2882 | if (jiffies - sd->last_balance >= interval) { |
2889 | if (load_balance(this_cpu, this_rq, sd, idle)) { | 2883 | if (load_balance(this_cpu, this_rq, sd, idle)) { |
2890 | /* | 2884 | /* |
2891 | * We've pulled tasks over so either we're no | 2885 | * We've pulled tasks over so either we're no |