nuttx/sched
Masayuki Ishikawa 1d958980bd Merged in masayuki2009/nuttx.nuttx/fix_smp_bugs (pull request #615)
Fix SMP related bugs

* sched/sched: Fix a deadlock in SMP mode

    Two months ago, I introduced sched_tasklist_lock() and
    sched_tasklist_unlock() to protect tasklists in SMP mode.
    Actually, this change works pretty well for HTTP audio
    streaming aging test with lc823450-xgevk.

    However, I found a deadlock in the scheduler when I tried
    similar aging tests with DVFS autonomous mode where CPU
    clock speed changed based on cpu load. In this case, call
    sequences were as follows;

    cpu1: sched_unlock()->sched_mergepending()->sched_addreadytorun()->up_cpu_pause()
    cpu0: sched_lock()->sched_mergepending()

    To avoid this deadlock, I added sched_tasklist_unlock() when calling
    up_cpu_pause() and sched_addreadytorun(). Also, added
    sched_tasklist_lock() after the call.

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* libc: Add critical section in lib_filesem.c for SMP

    To set my_pid into fs_folder atomically in SMP mode,
    critical section API must be used.

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* mm: Add critical section in mm_sem.c for SMP

    To set my_pid into mm_folder atomically in SMP mode,
    critical section API must be used.

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* net: Add critical section in net_lock.c for SMP

    To set my pid (me) into fs_folder atomically in SMP mode,
    critical section API must be used.

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-03-20 12:34:38 +00:00
..
clock Update some comments. 2018-03-14 08:17:50 -06:00
environ Standardization of some function headers. 2018-03-13 09:52:27 -06:00
errno Standardization of some function headers. 2018-03-13 09:52:27 -06:00
group Standardization of some function headers. 2018-03-13 09:52:27 -06:00
init Eliminate new warnings due to unused local variables noted in build testing. 2018-02-01 10:25:48 -06:00
irq sched/task: It is not appropriate for logic in task_exit() to call the new version of this_task(). sched/irq: Remove redundant fetch of CPU index; configs/sabre-6qguad: update README. 2018-02-06 19:06:33 -06:00
module Update comments, mostly spelling errors. 2018-01-27 09:37:46 -06:00
mqueue Standardization of some function headers. 2018-03-13 09:52:27 -06:00
paging Make sure that labeling is used consistently in all function headers. 2018-02-01 10:00:02 -06:00
pthread Standardization of some function headers. 2018-03-13 09:52:27 -06:00
sched Merged in masayuki2009/nuttx.nuttx/fix_smp_bugs (pull request #615) 2018-03-20 12:34:38 +00:00
semaphore Standardization of some function headers. 2018-03-13 09:52:27 -06:00
signal Standardization of some function headers. 2018-03-13 09:52:27 -06:00
task Update some comments. 2018-03-16 09:34:09 -06:00
timer Standardization of some function headers. 2018-03-13 09:52:27 -06:00
wdog Standardization of some function headers. 2018-03-13 09:52:27 -06:00
wqueue Standardization of some function headers. 2018-03-13 09:52:27 -06:00
.gitignore .dSYM only needs to be in the same .gitignore files as .exe 2013-05-30 15:02:04 -06:00
Kconfig Kconfigs: Add comments and a dependency. 2018-02-04 16:32:14 -06:00
Makefile TLS: Simplify 2016-03-11 07:17:32 -06:00