yoctoschedulerbitbakeyocto-recipe

Yocto Mickldore Group RT Scheduling issues with pthread created with FIFO policy


I'm currently building a yocto image using 6.1-mickledore (mickledore).

When I run my application it exits prematurely because of some pthread_create code. It looks like when I comment out setting the policy to FIFO the program runs fine. After a bunch of internet searching I found out this was because of group rt scheduling. The program is able to run if I disable the group rt scheduling using the command sysctl -w kernel.sched_rt_runtime_us=-1 described in this link here

Although I have a solution during runtime I don't quite understand how to reconfigure to yocto to disable this by default. Does anyone know how to disable this group rt scheduling in the bitbake recipes?


Solution

  • The solution to this problem can be found here:

    Add New Kernel Parameter To Custom Linux Image Generated By Yocto

    Essentially running sysctl -w kernel.sched_rt_runtime_us=-1 set's the /proc/sys/kernel/sched_rt_runtime_us

    This can be defaulted by appending a default value in /etc/sysctl.conf. For example kernel.sched_rt_runtime_us = -1

    To configure this in yocto, we can create a procps folder, procps_%.bbappend and systctl.conf in recipes-extended in your layer such as

    meta-my-layer/recipes-extended/
    └── procps
        ├── files
        │   └── sysctl.conf
        └── procps_%.bbappend
    

    procps_%.bbappend:

    FILESEXTRAPATHS_prepend := "${THISDIR}/files:"