diff options
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r-- | kernel/sched/fair.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index d6509d6f9313..2ffa6ee813ad 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
@@ -4759,7 +4759,7 @@ static const u64 cfs_bandwidth_slack_period = 5 * NSEC_PER_MSEC; | |||
4759 | static int runtime_refresh_within(struct cfs_bandwidth *cfs_b, u64 min_expire) | 4759 | static int runtime_refresh_within(struct cfs_bandwidth *cfs_b, u64 min_expire) |
4760 | { | 4760 | { |
4761 | struct hrtimer *refresh_timer = &cfs_b->period_timer; | 4761 | struct hrtimer *refresh_timer = &cfs_b->period_timer; |
4762 | u64 remaining; | 4762 | s64 remaining; |
4763 | 4763 | ||
4764 | /* if the call-back is running a quota refresh is already occurring */ | 4764 | /* if the call-back is running a quota refresh is already occurring */ |
4765 | if (hrtimer_callback_running(refresh_timer)) | 4765 | if (hrtimer_callback_running(refresh_timer)) |
@@ -4767,7 +4767,7 @@ static int runtime_refresh_within(struct cfs_bandwidth *cfs_b, u64 min_expire) | |||
4767 | 4767 | ||
4768 | /* is a quota refresh about to occur? */ | 4768 | /* is a quota refresh about to occur? */ |
4769 | remaining = ktime_to_ns(hrtimer_expires_remaining(refresh_timer)); | 4769 | remaining = ktime_to_ns(hrtimer_expires_remaining(refresh_timer)); |
4770 | if (remaining < min_expire) | 4770 | if (remaining < (s64)min_expire) |
4771 | return 1; | 4771 | return 1; |
4772 | 4772 | ||
4773 | return 0; | 4773 | return 0; |
@@ -7179,6 +7179,7 @@ static inline int select_idle_smt(struct task_struct *p, struct sched_domain *sd | |||
7179 | */ | 7179 | */ |
7180 | static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int target) | 7180 | static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int target) |
7181 | { | 7181 | { |
7182 | struct cpumask *cpus = this_cpu_cpumask_var_ptr(select_idle_mask); | ||
7182 | struct sched_domain *this_sd; | 7183 | struct sched_domain *this_sd; |
7183 | u64 avg_cost, avg_idle; | 7184 | u64 avg_cost, avg_idle; |
7184 | u64 time, cost; | 7185 | u64 time, cost; |
@@ -7209,11 +7210,11 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int t | |||
7209 | 7210 | ||
7210 | time = local_clock(); | 7211 | time = local_clock(); |
7211 | 7212 | ||
7212 | for_each_cpu_wrap(cpu, sched_domain_span(sd), target) { | 7213 | cpumask_and(cpus, sched_domain_span(sd), &p->cpus_allowed); |
7214 | |||
7215 | for_each_cpu_wrap(cpu, cpus, target) { | ||
7213 | if (!--nr) | 7216 | if (!--nr) |
7214 | return -1; | 7217 | return -1; |
7215 | if (!cpumask_test_cpu(cpu, &p->cpus_allowed)) | ||
7216 | continue; | ||
7217 | if (idle_cpu(cpu)) | 7218 | if (idle_cpu(cpu)) |
7218 | break; | 7219 | break; |
7219 | } | 7220 | } |