hamadmarri / ECHO-CPU-Scheduler

ECHO CPU Scheduler - Enhanced CPU Handling Orchestrator It is a CPU processes scheduler patch for Linux kernel.
25 stars 2 forks source link

port to 6.6 kernel? #2

Open dim-geo opened 3 months ago

dim-geo commented 3 months ago

Hello,

any chance to backport to 6.6 kernel?

hamadmarri commented 3 months ago

Hello @dim-geo Sure!

dim-geo commented 3 months ago

Here are the errors when I try to merge cachy-echo patches to 6.6

In file included from kernel/sched/sched.h:1969,
                 from kernel/sched/bs.c:14:
kernel/sched/fair_dep_funcs.h: In function 'update_curr_common':
./include/linux/build_bug.h:78:41: error: static assertion failed: "max(delta_exec, stats->exec_max) signedness error, fix types or consider umax() before max_t()"
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                         ^~~~~~~~~~~~~~
kernel/sched/stats.h:42:53: note: in definition of macro '__schedstat_set'
   42 | #define __schedstat_set(var, val)       do { var = (val); } while (0)
      |                                                     ^~~
./include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
   77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
      |                                  ^~~~~~~~~~~~~~~
./include/linux/minmax.h:51:9: note: in expansion of macro 'static_assert'
   51 |         static_assert(__types_ok(x, y),                 \
      |         ^~~~~~~~~~~~~
./include/linux/minmax.h:58:17: note: in expansion of macro '__cmp_once'
   58 |                 __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
      |                 ^~~~~~~~~~
./include/linux/minmax.h:92:25: note: in expansion of macro '__careful_cmp'
   92 | #define max(x, y)       __careful_cmp(max, x, y)
      |                         ^~~~~~~~~~~~~
kernel/sched/fair_dep_funcs.h:26:33: note: in expansion of macro 'max'
   26 |                                 max(delta_exec, stats->exec_max));
      |                                 ^~~
In file included from kernel/sched/bs.c:49:
kernel/sched/fair_dep_funcs.h:29:9: error: too few arguments to function 'trace_sched_stat_runtime'
   29 |         trace_sched_stat_runtime(curtask, delta_exec);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./include/trace/syscall.h:5,
                 from ./include/linux/syscalls.h:90,
                 from ./include/linux/syscalls_api.h:1,
                 from kernel/sched/sched.h:61:
./include/linux/tracepoint.h:355:28: note: declared here
  355 |         static inline void trace_##name(proto)                          \
      |                            ^~~~~~
./include/linux/tracepoint.h:432:9: note: in expansion of macro '__DECLARE_TRACE'
  432 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
      |         ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:555:9: note: in expansion of macro 'DECLARE_TRACE'
  555 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
      |         ^~~~~~~~~~~~~
./include/trace/events/sched.h:520:1: note: in expansion of macro 'DEFINE_EVENT'
  520 | DEFINE_EVENT(sched_stat_runtime, sched_stat_runtime,
      | ^~~~~~~~~~~~
kernel/sched/fair_dep_funcs.h:32:20: error: 'struct task_struct' has no member named 'dl_server'
   32 |         if (curtask->dl_server)
      |                    ^~
kernel/sched/fair_dep_funcs.h:33:17: error: implicit declaration of function 'dl_server_update' [-Werror=implicit-function-declaration]
   33 |                 dl_server_update(curtask->dl_server, delta_exec);
      |                 ^~~~~~~~~~~~~~~~
kernel/sched/fair_dep_funcs.h:33:41: error: 'struct task_struct' has no member named 'dl_server'
   33 |                 dl_server_update(curtask->dl_server, delta_exec);
      |                                         ^~
kernel/sched/fair_dep_funcs.h: In function 'prio_changed_fair':
kernel/sched/fair_dep_funcs.h:230:17: error: implicit declaration of function 'wakeup_preempt'; did you mean 'rseq_preempt'? [-Werror=implicit-function-declaration]
  230 |                 wakeup_preempt(rq, p, 0);
      |                 ^~~~~~~~~~~~~~
      |                 rseq_preempt
kernel/sched/fair_dep_funcs.h: In function '_task_util_est':
kernel/sched/fair_dep_funcs.h:283:46: error: invalid operands to binary & (have 'struct util_est' and 'unsigned int')
  283 |         return READ_ONCE(p->se.avg.util_est) & ~UTIL_AVG_UNCHANGED;
      |                                              ^
In file included from ./arch/x86/include/generated/asm/rwonce.h:1,
                 from ./include/linux/compiler.h:246,
                 from ./include/linux/build_bug.h:5,
                 from ./include/linux/container_of.h:5,
                 from ./include/linux/list.h:5,
                 from ./include/linux/rculist.h:10,
                 from ./include/linux/sched/signal.h:5,
                 from ./include/linux/sched/cputime.h:5,
                 from kernel/sched/bs.c:7:
kernel/sched/fair_dep_funcs.h: In function 'cpu_util':
./include/asm-generic/rwonce.h:48:1: error: incompatible types when assigning to type 'long unsigned int' from type 'struct util_est'
   48 | ({                                                                      \
      | ^
kernel/sched/fair_dep_funcs.h:312:28: note: in expansion of macro 'READ_ONCE'
  312 |                 util_est = READ_ONCE(cfs_rq->avg.util_est);
      |                            ^~~~~~~~~
kernel/sched/fair_dep_funcs.h: In function 'util_est_enqueue':
kernel/sched/fair_dep_funcs.h:644:21: error: incompatible types when assigning to type 'unsigned int' from type 'struct util_est'
  644 |         enqueued  = cfs_rq->avg.util_est;
      |                     ^~~~~~
./include/asm-generic/rwonce.h:55:39: error: incompatible types when assigning to type 'struct util_est' from type 'unsigned int'
   55 |         *(volatile typeof(x) *)&(x) = (val);                            \
      |                                       ^
./include/asm-generic/rwonce.h:61:9: note: in expansion of macro '__WRITE_ONCE'
   61 |         __WRITE_ONCE(x, val);                                           \
      |         ^~~~~~~~~~~~
kernel/sched/fair_dep_funcs.h:646:9: note: in expansion of macro 'WRITE_ONCE'
  646 |         WRITE_ONCE(cfs_rq->avg.util_est, enqueued);
      |         ^~~~~~~~~~
kernel/sched/fair_dep_funcs.h: In function 'util_est_dequeue':
kernel/sched/fair_dep_funcs.h:660:21: error: incompatible types when assigning to type 'unsigned int' from type 'struct util_est'
  660 |         enqueued  = cfs_rq->avg.util_est;
      |                     ^~~~~~
./include/asm-generic/rwonce.h:55:39: error: incompatible types when assigning to type 'struct util_est' from type 'unsigned int'
   55 |         *(volatile typeof(x) *)&(x) = (val);                            \
      |                                       ^
./include/asm-generic/rwonce.h:61:9: note: in expansion of macro '__WRITE_ONCE'
   61 |         __WRITE_ONCE(x, val);                                           \
      |         ^~~~~~~~~~~~
kernel/sched/fair_dep_funcs.h:662:9: note: in expansion of macro 'WRITE_ONCE'
  662 |         WRITE_ONCE(cfs_rq->avg.util_est, enqueued);
      |         ^~~~~~~~~~
kernel/sched/fair_dep_funcs.h: In function 'util_est_update':
./include/asm-generic/rwonce.h:48:1: error: incompatible types when assigning to type 'unsigned int' from type 'struct util_est'
   48 | ({                                                                      \
      | ^
kernel/sched/fair_dep_funcs.h:691:16: note: in expansion of macro 'READ_ONCE'
  691 |         ewma = READ_ONCE(p->se.avg.util_est);
      |                ^~~~~~~~~
./include/asm-generic/rwonce.h:55:39: error: incompatible types when assigning to type 'struct util_est' from type 'unsigned int'
   55 |         *(volatile typeof(x) *)&(x) = (val);                            \
      |                                       ^
./include/asm-generic/rwonce.h:61:9: note: in expansion of macro '__WRITE_ONCE'
   61 |         __WRITE_ONCE(x, val);                                           \
      |         ^~~~~~~~~~~~
kernel/sched/fair_dep_funcs.h:756:9: note: in expansion of macro 'WRITE_ONCE'
  756 |         WRITE_ONCE(p->se.avg.util_est, ewma);
      |         ^~~~~~~~~~
kernel/sched/bs.c: In function 'update_curr':
./include/linux/build_bug.h:78:41: error: static assertion failed: "max(delta_exec, stats->exec_max) signedness error, fix types or consider umax() before max_t()"
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                         ^~~~~~~~~~~~~~
kernel/sched/stats.h:42:53: note: in definition of macro '__schedstat_set'
   42 | #define __schedstat_set(var, val)       do { var = (val); } while (0)
      |                                                     ^~~
./include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
   77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
      |                                  ^~~~~~~~~~~~~~~
./include/linux/minmax.h:51:9: note: in expansion of macro 'static_assert'
   51 |         static_assert(__types_ok(x, y),                 \
      |         ^~~~~~~~~~~~~
./include/linux/minmax.h:58:17: note: in expansion of macro '__cmp_once'
   58 |                 __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
      |                 ^~~~~~~~~~
./include/linux/minmax.h:92:25: note: in expansion of macro '__careful_cmp'
   92 | #define max(x, y)       __careful_cmp(max, x, y)
      |                         ^~~~~~~~~~~~~
kernel/sched/bs.c:160:33: note: in expansion of macro 'max'
  160 |                                 max(delta_exec, stats->exec_max));
      |                                 ^~~
kernel/sched/bs.c:175:9: error: too few arguments to function 'trace_sched_stat_runtime'
  175 |         trace_sched_stat_runtime(curtask, delta_exec);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/tracepoint.h:355:28: note: declared here
  355 |         static inline void trace_##name(proto)                          \
      |                            ^~~~~~
./include/linux/tracepoint.h:432:9: note: in expansion of macro '__DECLARE_TRACE'
  432 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
      |         ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:555:9: note: in expansion of macro 'DECLARE_TRACE'
  555 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
      |         ^~~~~~~~~~~~~
./include/trace/events/sched.h:520:1: note: in expansion of macro 'DEFINE_EVENT'
  520 | DEFINE_EVENT(sched_stat_runtime, sched_stat_runtime,
      | ^~~~~~~~~~~~
kernel/sched/bs.c:178:20: error: 'struct task_struct' has no member named 'dl_server'
  178 |         if (curtask->dl_server)
      |                    ^~
kernel/sched/bs.c:179:41: error: 'struct task_struct' has no member named 'dl_server'
  179 |                 dl_server_update(curtask->dl_server, delta_exec);
      |                                         ^~
In file included from kernel/sched/bs.c:747:
kernel/sched/balancer.h: In function 'nohz_try_pull_from_candidate':
kernel/sched/balancer.h:676:24: warning: unused variable 'cfs_rq' [-Wunused-variable]
  676 |         struct cfs_rq *cfs_rq;
      |                        ^~~~~~
kernel/sched/bs.c: At top level:
kernel/sched/bs.c:791:10: error: 'const struct sched_class' has no member named 'wakeup_preempt'
  791 |         .wakeup_preempt         = check_preempt_wakeup_fair,
      |          ^~~~~~~~~~~~~~
kernel/sched/fair_dep_funcs.h: In function '_task_util_est':
kernel/sched/fair_dep_funcs.h:284:1: error: control reaches end of non-void function [-Werror=return-type]
  284 | }
      | ^