hamadmarri / cacule-cpu-scheduler

The CacULE CPU scheduler is based on interactivity score mechanism. The interactivity score is inspired by the ULE scheduler (FreeBSD scheduler).
266 stars 32 forks source link

Compiling error when CONFIG_SCHED_DEBUG is enabled #18

Closed raykzhao closed 3 years ago

raykzhao commented 3 years ago

Hi @hamadmarri

I got the following error with the latest CacULE patch when compiling with CONFIG_SCHED_DEBUG enabled:

kernel/sched/fair.c:748:9: error: incompatible pointer types returning 'struct cacule_node *' from a function with result type 'struct sched_entity *'

Should line 748 be return se_of(cfs_rq->head);?

raykzhao commented 3 years ago

In addition, I also got the following errors:

kernel/sched/debug.c:442:18: error: no member named 'vruntime' in 'struct sched_entity'
kernel/sched/debug.c:506:49: error: no member named 'vruntime' in 'struct sched_entity'
kernel/sched/debug.c:509:24: error: no member named 'vruntime' in 'struct sched_entity'
kernel/sched/debug.c:887:8: error: no member named 'vruntime' in 'struct sched_entity'

I think line 388 should also have the same issue. vruntime should be cacule_node.vruntime now.

hamadmarri commented 3 years ago

Yes, you are right. I will fix it.

Thank you @raykzhao

hamadmarri commented 3 years ago

Hi @raykzhao

Please check this commit: https://github.com/hamadmarri/cacule-cpu-scheduler/commit/d9cac29d56687c477e1b2b2691153d368bb2dfdc

I also fixed returning last entity instead of the first in __pick_last_entity

Thank you