History

sched/fair: Remove SIS_PROP

SIS_UTIL seems to work well, lets remove the old thing.

Peter Zijlstra committed 3 years ago

Commit 984ffb61 parent 22165f65 files · +0 −59Browse files

Unified · Split

5 files
  1. include/linux/sched/topology.h +0 −2
  2. kernel/sched/core.c +0 −5
  3. kernel/sched/fair.c +0 −48
  4. kernel/sched/features.h +0 −1
  5. kernel/sched/sched.h +0 −3
include/linux/sched/topology.h+0−2
@@ -109,8 +109,6 @@ struct sched_domain { · 108 unmodified lines
109 u64 max_newidle_lb_cost;109 u64 max_newidle_lb_cost;
110 unsigned long last_decay_max_lb_cost;110 unsigned long last_decay_max_lb_cost;
111 111
112 u64 avg_scan_cost; /* select_idle_sibling */
113
114#ifdef CONFIG_SCHEDSTATS112#ifdef CONFIG_SCHEDSTATS
115 /* load_balance() stats */113 /* load_balance() stats */
116 unsigned int lb_count[CPU_MAX_IDLE_TYPES];114 unsigned int lb_count[CPU_MAX_IDLE_TYPES];
kernel/sched/core.c+0−5
@@ -3792,9 +3792,6 @@ ttwu_do_activate(struct rq *rq, struct task_struct *p, int wake_flags, · 3791 unmodified lines
3792 if (rq->avg_idle > max)3792 if (rq->avg_idle > max)
3793 rq->avg_idle = max;3793 rq->avg_idle = max;
3794 3794
3795 rq->wake_stamp = jiffies;
3796 rq->wake_avg_idle = rq->avg_idle / 2;
3797
3798 rq->idle_stamp = 0;3795 rq->idle_stamp = 0;
3799 }3796 }
3800#endif3797#endif
@@ -9953,8 +9950,6 @@ void __init sched_init(void) · 6152 unmodified lines
9953 rq->online = 0;9950 rq->online = 0;
9954 rq->idle_stamp = 0;9951 rq->idle_stamp = 0;
9955 rq->avg_idle = 2*sysctl_sched_migration_cost;9952 rq->avg_idle = 2*sysctl_sched_migration_cost;
9956 rq->wake_stamp = jiffies;
9957 rq->wake_avg_idle = rq->avg_idle;
9958 rq->max_idle_balance_cost = sysctl_sched_migration_cost;9953 rq->max_idle_balance_cost = sysctl_sched_migration_cost;
9959 9954
9960 INIT_LIST_HEAD(&rq->cfs_tasks);9955 INIT_LIST_HEAD(&rq->cfs_tasks);
kernel/sched/fair.c+0−48
@@ -7209,45 +7209,9 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, bool · 7208 unmodified lines
7209 struct cpumask *cpus = this_cpu_cpumask_var_ptr(select_rq_mask);7209 struct cpumask *cpus = this_cpu_cpumask_var_ptr(select_rq_mask);
7210 int i, cpu, idle_cpu = -1, nr = INT_MAX;7210 int i, cpu, idle_cpu = -1, nr = INT_MAX;
7211 struct sched_domain_shared *sd_share;7211 struct sched_domain_shared *sd_share;
7212 struct rq *this_rq = this_rq();
7213 int this = smp_processor_id();
7214 struct sched_domain *this_sd = NULL;
7215 u64 time = 0;
7216 7212
7217 cpumask_and(cpus, sched_domain_span(sd), p->cpus_ptr);7213 cpumask_and(cpus, sched_domain_span(sd), p->cpus_ptr);
7218 7214
7219 if (sched_feat(SIS_PROP) && !has_idle_core) {
7220 u64 avg_cost, avg_idle, span_avg;
7221 unsigned long now = jiffies;
7222
7223 this_sd = rcu_dereference(*this_cpu_ptr(&sd_llc));
7224 if (!this_sd)
7225 return -1;
7226
7227 /*
7228 * If we're busy, the assumption that the last idle period
7229 * predicts the future is flawed; age away the remaining
7230 * predicted idle time.
7231 */
7232 if (unlikely(this_rq->wake_stamp < now)) {
7233 while (this_rq->wake_stamp < now && this_rq->wake_avg_idle) {
7234 this_rq->wake_stamp++;
7235 this_rq->wake_avg_idle >>= 1;
7236 }
7237 }
7238
7239 avg_idle = this_rq->wake_avg_idle;
7240 avg_cost = this_sd->avg_scan_cost + 1;
7241
7242 span_avg = sd->span_weight * avg_idle;
7243 if (span_avg > 4*avg_cost)
7244 nr = div_u64(span_avg, avg_cost);
7245 else
7246 nr = 4;
7247
7248 time = cpu_clock(this);
7249 }
7250
7251 if (sched_feat(SIS_UTIL)) {7215 if (sched_feat(SIS_UTIL)) {
7252 sd_share = rcu_dereference(per_cpu(sd_llc_shared, target));7216 sd_share = rcu_dereference(per_cpu(sd_llc_shared, target));
7253 if (sd_share) {7217 if (sd_share) {
@@ -7301,18 +7265,6 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, bool · 47 unmodified lines
7301 if (has_idle_core)7265 if (has_idle_core)
7302 set_idle_cores(target, false);7266 set_idle_cores(target, false);
7303 7267
7304 if (sched_feat(SIS_PROP) && this_sd && !has_idle_core) {
7305 time = cpu_clock(this) - time;
7306
7307 /*
7308 * Account for the scan cost of wakeups against the average
7309 * idle time.
7310 */
7311 this_rq->wake_avg_idle -= min(this_rq->wake_avg_idle, time);
7312
7313 update_avg(&this_sd->avg_scan_cost, time);
7314 }
7315
7316 return idle_cpu;7268 return idle_cpu;
7317}7269}
7318 7270
kernel/sched/features.h+0−1
@@ -49,7 +49,6 @@ SCHED_FEAT(TTWU_QUEUE, true) · 48 unmodified lines
49/*49/*
50 * When doing wakeups, attempt to limit superfluous scans of the LLC domain.50 * When doing wakeups, attempt to limit superfluous scans of the LLC domain.
51 */51 */
52SCHED_FEAT(SIS_PROP, false)
53SCHED_FEAT(SIS_UTIL, true)52SCHED_FEAT(SIS_UTIL, true)
54 53
55/*54/*
kernel/sched/sched.h+0−3
@@ -1059,9 +1059,6 @@ struct rq { · 1058 unmodified lines
1059 u64 idle_stamp;1059 u64 idle_stamp;
1060 u64 avg_idle;1060 u64 avg_idle;
1061 1061
1062 unsigned long wake_stamp;
1063 u64 wake_avg_idle;
1064
1065 /* This is used to determine avg_idle's max value */1062 /* This is used to determine avg_idle's max value */
1066 u64 max_idle_balance_cost;1063 u64 max_idle_balance_cost;
1067 1064

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t