aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/trace/events/sched.h25
-rw-r--r--kernel/sched/tune.c5
2 files changed, 30 insertions, 0 deletions
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index 32ce2e7f864e..7308931f88d7 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -851,6 +851,31 @@ TRACE_EVENT(sched_tune_filter,
__entry->nrg_payoff, __entry->region)
);
+/*
+ * Tracepoint for schedtune_boostgroup_update
+ */
+TRACE_EVENT(sched_tune_boostgroup_update,
+
+ TP_PROTO(int cpu, int variation, int max_boost),
+
+ TP_ARGS(cpu, variation, max_boost),
+
+ TP_STRUCT__entry(
+ __field( int, cpu )
+ __field( int, variation )
+ __field( int, max_boost )
+ ),
+
+ TP_fast_assign(
+ __entry->cpu = cpu;
+ __entry->variation = variation;
+ __entry->max_boost = max_boost;
+ ),
+
+ TP_printk("cpu=%d variation=%d max_boost=%d",
+ __entry->cpu, __entry->variation, __entry->max_boost)
+);
+
#endif /* _TRACE_SCHED_H */
/* This part must be outside protection */
diff --git a/kernel/sched/tune.c b/kernel/sched/tune.c
index 9760a3f0b5cd..2ec7e63524a5 100644
--- a/kernel/sched/tune.c
+++ b/kernel/sched/tune.c
@@ -348,13 +348,18 @@ schedtune_boostgroup_update(int idx, int boost)
/* Check if this update increase current max */
if (boost > cur_boost_max && bg->group[idx].tasks) {
bg->boost_max = boost;
+ trace_sched_tune_boostgroup_update(cpu, 1, bg->boost_max);
continue;
}
/* Check if this update has decreased current max */
if (cur_boost_max == old_boost && old_boost > boost) {
schedtune_cpu_update(cpu);
+ trace_sched_tune_boostgroup_update(cpu, -1, bg->boost_max);
+ continue;
}
+
+ trace_sched_tune_boostgroup_update(cpu, 0, bg->boost_max);
}
return 0;