All of lore.kernel.org
 help / color / mirror / Atom feed
* Adding a sched_class after the removal of ".next" regarding priority
@ 2021-05-20 22:05 J Mårtensson
  2021-05-21  0:25 ` Paulo Miguel Almeida
  0 siblings, 1 reply; 2+ messages in thread
From: J Mårtensson @ 2021-05-20 22:05 UTC (permalink / raw)
  To: kernelnewbies

Hi,
I have been trying to add a new scheduler to the Linux kernel. I have
found that to add a sched_class, I need to add it to SCHED_DATA in
vmlinux.lds.h. instead of editing the now removed .next variable.
Depending on what order I put into the priority list, it will crash
the kernel during the booting process after rebooting. Any tips on
what could be causing this would be appreciated!

Currently this works

#define SCHED_DATA              \
    STRUCT_ALIGN();             \
    __begin_sched_classes = .;      \
    *(__idle_sched_class)           \
    *(__my_sched_class)         \
    *(__fair_sched_class)           \
    *(__rt_sched_class)         \
    *(__dl_sched_class)         \
    *(__stop_sched_class)           \
    __end_sched_classes = .;

While this does not

#define SCHED_DATA              \
    STRUCT_ALIGN();             \
    __begin_sched_classes = .;      \
    *(__idle_sched_class)           \
    *(__fair_sched_class)           \
    *(__my_sched_class)         \
    *(__rt_sched_class)         \
    *(__dl_sched_class)         \
    *(__stop_sched_class)           \
    __end_sched_classes = .;


Regards
Jacob

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-21  0:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 22:05 Adding a sched_class after the removal of ".next" regarding priority J Mårtensson
2021-05-21  0:25 ` Paulo Miguel Almeida

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.