Skip to content

SMP: fix repeat entry oneshot_tick_start#9986

Closed
yangguangcai01 wants to merge 1 commit intoapache:masterfrom
yangguangcai01:ygc_topic
Closed

SMP: fix repeat entry oneshot_tick_start#9986
yangguangcai01 wants to merge 1 commit intoapache:masterfrom
yangguangcai01:ygc_topic

Conversation

@yangguangcai01
Copy link
Copy Markdown

Situation:

Assume we have 2 cpus.

CPU0 CPU1

  1. -> nxsched_alarm_expiration
  2. -> nxshced_timer_start
  3. -> ONESHOT_TICK_START
  4. now timer in IRQ
    5. in thread
    6. -> wd_start
    7. -> nxshced_timer_start
    8. -> ONESHOT_TICK_START
    9. reentry timer crash

Fix:
Enter critical section before nxsched_timer_start

Situation:

Assume we have 2 cpus.

CPU0                                CPU1
1. -> nxsched_alarm_expiration
2. -> nxshced_timer_start
3. -> ONESHOT_TICK_START
4. now timer in IRQ
                                    5. in thread
                                    6. -> wd_start
                                    7. -> nxshced_timer_start
                                    8. -> ONESHOT_TICK_START
                                    9. reentry timer crash

Fix:
Enter critical section before nxsched_timer_start

Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
@yangguangcai01 yangguangcai01 deleted the ygc_topic branch August 1, 2023 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants