nuttx/sched/sched
hujun5 3619e61c31 sched: adjust the scheduling strategy
1 Only the idle task can have the flag TCB_FLAG_CPU_LOCKED.
  According to the code logic, btcb cannot be an idle task, so this check can be removed.
2 Optimized the preemption logic check and removed the call to nxsched_add_prioritized.
3 Speed up the scheduling time while avoiding the potential for
  tasks to be moved multiple times between g_assignedtasks and g_readytorun.

Configuring NuttX and compile:
$ ./tools/configure.sh -l qemu-armv8a:nsh_smp
$ make
Running with qemu
$ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \
   -machine virt,virtualization=on,gic-version=3 \
   -net none -chardev stdio,id=con,mux=on -serial chardev:con \
   -mon chardev=con,mode=readline -kernel ./nuttx

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-12 01:34:56 +08:00
..
CMakeLists.txt sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
Make.defs sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
queue.h sched: adjust the scheduling strategy 2024-09-12 01:34:56 +08:00
sched_addblocked.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_addprioritized.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_addreadytorun.c sched: adjust the scheduling strategy 2024-09-12 01:34:56 +08:00
sched_backtrace.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_cpuload_oneshot.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_cpuload_period.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_cpuload.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_cpupause.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_cpuselect.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_critmonitor.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_dumponexit.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_foreach.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_get_stackinfo.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_get_stateinfo.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_get_tls.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_getaffinity.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_getcpu.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_getfiles.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_getparam.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_getscheduler.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_gettcb.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_idletask.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_lock.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_lockcount.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_mergepending.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_mergeprioritized.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_processtimer.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_releasetcb.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_removeblocked.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_removereadytorun.c sched: adjust the scheduling strategy 2024-09-12 01:34:56 +08:00
sched_reprioritize.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_reprioritizertr.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_resumescheduler.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_roundrobin.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_rrgetinterval.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_self.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_setaffinity.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_setparam.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_setpriority.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_setscheduler.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_smp.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_sporadic.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_suspend.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_suspendscheduler.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_sysinfo.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_timerexpiration.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_unlock.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_verifytcb.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_wait.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_waitid.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_waitpid.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched_yield.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sched.h sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00