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
109109 u64 max_newidle_lb_cost;
110110 unsigned long last_decay_max_lb_cost;
111111
112− u64 avg_scan_cost; /* select_idle_sibling */
113−
114112 #ifdef CONFIG_SCHEDSTATS
115113 /* load_balance() stats */
116114 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
37923792 if (rq->avg_idle > max)
37933793 rq->avg_idle = max;
37943794
3795− rq->wake_stamp = jiffies;
3796− rq->wake_avg_idle = rq->avg_idle / 2;
3797−
37983795 rq->idle_stamp = 0;
37993796 }
38003797 #endif
@@ -9953,8 +9950,6 @@ void __init sched_init(void) · 6152 unmodified lines
99539950 rq->online = 0;
99549951 rq->idle_stamp = 0;
99559952 rq->avg_idle = 2*sysctl_sched_migration_cost;
9956− rq->wake_stamp = jiffies;
9957− rq->wake_avg_idle = rq->avg_idle;
99589953 rq->max_idle_balance_cost = sysctl_sched_migration_cost;
99599954
99609955 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
72097209 struct cpumask *cpus = this_cpu_cpumask_var_ptr(select_rq_mask);
72107210 int i, cpu, idle_cpu = -1, nr = INT_MAX;
72117211 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;
72167212
72177213 cpumask_and(cpus, sched_domain_span(sd), p->cpus_ptr);
72187214
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−
72517215 if (sched_feat(SIS_UTIL)) {
72527216 sd_share = rcu_dereference(per_cpu(sd_llc_shared, target));
72537217 if (sd_share) {
@@ -7301,18 +7265,6 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, bool · 47 unmodified lines
73017265 if (has_idle_core)
73027266 set_idle_cores(target, false);
73037267
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−
73167268 return idle_cpu;
73177269 }
73187270
kernel/sched/features.h+0−1
@@ -49,7 +49,6 @@ SCHED_FEAT(TTWU_QUEUE, true) · 48 unmodified lines
4949 /*
5050 * When doing wakeups, attempt to limit superfluous scans of the LLC domain.
5151 */
52−SCHED_FEAT(SIS_PROP, false)
5352 SCHED_FEAT(SIS_UTIL, true)
5453
5554 /*
kernel/sched/sched.h+0−3
@@ -1059,9 +1059,6 @@ struct rq { · 1058 unmodified lines
10591059 u64 idle_stamp;
10601060 u64 avg_idle;
10611061
1062− unsigned long wake_stamp;
1063− u64 wake_avg_idle;
1064−
10651062 /* This is used to determine avg_idle's max value */
10661063 u64 max_idle_balance_cost;
10671064

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