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).
264 stars 32 forks source link

__pick_last_entity returns cfs_rq->head #2

Closed fafok29 closed 4 years ago

fafok29 commented 4 years ago

Hello Hamad I noticed that _pick_last_entity returns cfs_rq->head. Is this intentional or it should be "cfs_rq->last"?

https://github.com/hamadmarri/cachy-sched/blob/9f0070f36db1bbbf8bdfd83534ef070ccc1135bb/patches/cachy-5.8.patch#L229

hamadmarri commented 4 years ago

Hi Fafok,

Yes it was intentional. The __pick_last_entity is for debugging purpose where it gets called in debug.c in

void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
{

...

last = __pick_last_entity(cfs_rq);

I used to have a pointer to the last entity, but I have removed it since it is really not needed in Cachy operation. I need to edit the debug.c in future to adapt these changes.