kernel: sched: default TIMESLICE_SIZE #94884
-
Subject: Regression after commit e337b7b (CONFIG_TIMESLICE_SIZE change) Hello, I am facing a regression after commit [e337b7b65d](e337b7b) which changed the default value of My setup:
After this commit:
I am not fully familiar with how timeslicing works in Zephyr, so I am wondering if this behavior is expected or if it reveals a bug in the scheduler. Thanks for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It doesn’t appear to be a regression in the Zephyr project itself, but rather something specific to how your application is set up. To better understand the behavior, the following documentation may be helpful: One way to experiment is to create two cooperative threads at the same priority and see how they behave with different My initial thought is that you might have several threads with the same priority. With It may help to review your thread priorities and confirm whether timeslicing is the right fit for your use case. |
Beta Was this translation helpful? Give feedback.
It doesn’t appear to be a regression in the Zephyr project itself, but rather something specific to how your application is set up.
To better understand the behavior, the following documentation may be helpful:
One way to experiment is to create two cooperative threads at the same priority and see how they behave with different
CONFIG_TIMESLICE_SIZE
values. This can give you a clearer picture of how timeslicing affects scheduling.My initial thought is that you might have several threads with the same priority. With
CONFIG_TIMESLICE_SIZE=0
, Zephyr lets a thread run as long as it needs, but once you set a non-zero value, the scheduler will preempt and swi…