nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

sched/sched/sched_timerexpiration: idle task no need RR time slice

Open mkeydevelop opened this issue 3 years ago • 0 comments

Round robin timeslice will not run on idle task

Summary

Low Energy device always use SCHED_TICKLESS mode, staying in idle mode as long as possible. All thread runing on default priority is very popular in real multi thread program. Round robin timeslice is useful in that scenario to make sure all thread have chance to run, especially small RR_INTERVAL. On the other hand, small RR_INTERVAL will break the idle task frequently. We should not split the idle task timeslice.

Impact

Idle task will run maximum tick if possible, and it just wakeup by task switch operation.

Testing

boards/arm/nrf52/nrf52840-dk/configs/nsh work as expected when SCHED_TICKLESS enable

mkeydevelop avatar Jul 21 '22 12:07 mkeydevelop