All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J Mårtensson" <martensson.jacob@gmail.com>
To: kernelnewbies@kernelnewbies.org
Subject: Adding a sched_class after the removal of ".next" regarding priority
Date: Fri, 21 May 2021 00:05:27 +0200	[thread overview]
Message-ID: <CAH36m_HeYmNQjGaD9WYtA5HKMJwmXOcRu9U8=oZyWCknE-Kpfw@mail.gmail.com> (raw)

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

             reply	other threads:[~2021-05-20 22:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20 22:05 J Mårtensson [this message]
2021-05-21  0:25 ` Adding a sched_class after the removal of ".next" regarding priority Paulo Miguel Almeida

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH36m_HeYmNQjGaD9WYtA5HKMJwmXOcRu9U8=oZyWCknE-Kpfw@mail.gmail.com' \
    --to=martensson.jacob@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.