firelzrd / bore-scheduler

BORE (Burst-Oriented Response Enhancer) CPU Scheduler
GNU General Public License v2.0
324 stars 13 forks source link

Errors when compiling with Clang #45

Closed 0x647262 closed 1 month ago

0x647262 commented 2 months ago

Kernel version: https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.10.8.tar.xz Bore patch version: https://raw.githubusercontent.com/firelzrd/bore-scheduler/main/patches/stable/linux-6.10-bore/0001-linux6.10.y-bore5.2.8.patch

kernel/sched/fair.c:139:6: error: conflicting types for 'reweight_task'
  139 | void reweight_task(struct task_struct *p, int prio);
      |      ^
kernel/sched/sched.h:2471:13: note: previous declaration is here
 2471 | extern void reweight_task(struct task_struct *p, const struct load_weight *lw);
      |             ^
kernel/sched/fair.c:151:20: error: incompatible integer to pointer conversion passing 'u8' (aka 'unsigned char') to parameter of type 'const struct load_weight *' [-Wint-conversion]
  151 |                 reweight_task(p, new_prio);
      |                                  ^~~~~~~~
kernel/sched/sched.h:2471:76: note: passing argument to parameter 'lw' here
 2471 | extern void reweight_task(struct task_struct *p, const struct load_weight *lw);
      |                                                                            ^

If I have some spare time this weekend I think I understand what's going on and I'll get a PR up

firelzrd commented 1 month ago

Thank you for the report. Do you mean you used BORE 5.2.6 or below? In 5.2.8 and above reweight_task is no longer used, and therefore it should successfully compile without error from that part. Please re-check the version of the used BORE patch. Besides, new v5.{1,2}.11 is out as a stable release. Thank you~ :)

0x647262 commented 1 month ago

5.2.11 works like a charm, thank you! :smile: