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

__aeabi_uldivmod undefined on 32-bit ARM when compiling with clang #11

Closed raykzhao closed 3 years ago

raykzhao commented 3 years ago

Hi.

When I tried to compile the source code on my 32-bit Raspberry Pi with clang compiler, I got the error that the symbol __aeabi_uldivmod was undefined. By a quick Google search it seems to be due to the divisions (https://stackoverflow.com/questions/25623956/aeabi-ldivmod-undefined-when-compiling-kernel-module). I am not sure whether compiling with gcc would return the same error.

By the way, the performance of your scheduler is really impressive on my desktop machines. Thank you for your great work!

Regards, Raymond

raykzhao commented 3 years ago

Just tried with gcc on my Raspberry Pi and got the same issue.

hamadmarri commented 3 years ago

Hi Raymond,

Yes, it looks like the division of u64 is the problem. I will try to fix it soon.

By the way what patch revision are you using? Have you encountered any freezes or hangups while cpus on heavy load?

Thanks,

raykzhao commented 3 years ago

Hi.

I am using the 5.8-r2, and so far I have not encountered any freezes/hangups during the heavy load e.g. compiling the kernel.

Regards, Raymond

hamadmarri commented 3 years ago

Hi @raykzhao ,

Could you please try the attached patch on top of https://github.com/hamadmarri/cachy-sched/blob/master/patches/cachy/v5.8/cachy-5.8-r5.patch

cachy-5.8-32bit-r5.zip

raykzhao commented 3 years ago

Hi.

It works. Thank you!

Regards, Raymond

hamadmarri commented 3 years ago

I suggest to tune the hrrn_max_lifetime in 32bit hardware to 4s because the maximum life time can unsigned int hold is roughly 4.29s

sudo sysctl kernel.sched_hrrn_max_lifetime_ms=4000