[PATCH 08/10] sched/fair: Reintroduce SIS_AVG_CPU but in the context of SIS_PROP to reduce search depth

From: Mel Gorman
Date: Thu Dec 03 2020 - 09:12:27 EST


Subject says it all but no supporting data at this time. This might help
the hackbench case in isolation or throw other workloads under the bus.
Final version will have proper data.

Signed-off-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
---
kernel/sched/fair.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 185fc6e28f8e..33ce65b67381 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6024,6 +6024,14 @@ static int sis_search_depth(struct sched_domain *sd, struct sched_domain *this_s
nr = div_u64(span_avg, avg_cost);
else
nr = 4;
+
+ /*
+ * Throttle the depth search futher if average idle time is
+ * below the average cost. This is primarily to deal with
+ * the saturated case where searches are likely to fail.
+ */
+ if (avg_idle < avg_cost)
+ nr >>= 1;
}

return nr;
--
2.26.2