d295f11a3a
The previous implementation of clearing global IRQ in sched_addreadytorun() and sched_removereadytorun() was done too early. As a result, nxsem_post() would have a chance to enter the critical section even nxsem_wait() is still not in blocked state. This patch moves clearing global IRQ controls from sched_addreadytorun() and sched_removereadytorun() to sched_resumescheduler() to ensure that nxsem_post() can enter the critical section correctly. For this change, sched_resumescheduler.c is always necessary for SMP configuration. In addition, by this change, task_exit() had to be modified so that it calls sched_resumescheduler() because it calls sched_removescheduler() inside the function, otherwise it will cause a deadlock. However, I encountered another DEBUGASSERT() in sched_cpu_select() during HTTP streaming aging test on lc823450-xgevk. Actually sched_cpu_select() accesses the g_assignedtasks which might be changed by another CPU. Similarly, other tasklists might be modified simultaneously if both CPUs are executing scheduling logic. To avoid this, I introduced tasklist protetion APIs. With these changes, SMP kernel stability has been much improved. Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com> |
||
---|---|---|
.. | ||
exit.c | ||
Make.defs | ||
spawn.h | ||
task_activate.c | ||
task_atexit.c | ||
task_cancelpt.c | ||
task_create.c | ||
task_delete.c | ||
task_execv.c | ||
task_exit.c | ||
task_exithook.c | ||
task_getgroup.c | ||
task_getpid.c | ||
task_init.c | ||
task_onexit.c | ||
task_posixspawn.c | ||
task_prctl.c | ||
task_recover.c | ||
task_reparent.c | ||
task_restart.c | ||
task_setcancelstate.c | ||
task_setcanceltype.c | ||
task_setup.c | ||
task_spawn.c | ||
task_spawnparms.c | ||
task_start.c | ||
task_starthook.c | ||
task_terminate.c | ||
task_testcancel.c | ||
task_vfork.c | ||
task.h |