Re: [PATCH 1/4 v4] sched/pelt: Move pelt related code in a dedicated file

From: Dietmar Eggemann
Date: Sun Apr 15 2018 - 07:58:56 EST


On 03/16/2018 12:25 PM, Vincent Guittot wrote:

[...]

diff --git a/kernel/sched/pelt.h b/kernel/sched/pelt.h
new file mode 100644
index 0000000..c312d8c
--- /dev/null
+++ b/kernel/sched/pelt.h
@@ -0,0 +1,17 @@
+#ifdef CONFIG_SMP
+
+int __update_load_avg_blocked_se(u64 now, int cpu, struct sched_entity *se);
+int __update_load_avg_se(u64 now, int cpu, struct cfs_rq *cfs_rq, struct sched_entity *se);
+int __update_load_avg_cfs_rq(u64 now, int cpu, struct cfs_rq *cfs_rq);
+
+#else
+
+static inline int
+update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq)
+{
+ return 0;
+}
+
+#endif

Exporting __update_load_avg_cfs_rq() for SMP and update_cfs_rq_load_avg() for !SMP seems weird.

[...]