Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BACKPORT #2298] sched: Fix nx_waitid(), nx_waitpid(), nxtask_exithook() for SMP #2306

Merged
merged 1 commit into from
Nov 15, 2020

Conversation

Ouss4
Copy link
Member

@Ouss4 Ouss4 commented Nov 15, 2020

Summary

Backports #2298

@Ouss4
Copy link
Member Author

Ouss4 commented Nov 15, 2020

@masayuki2009 @btashton This had a little conflict in nxtask_exithook. Please take a look.

Copy link
Contributor

@btashton btashton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for the backport. We certainly still have more work to do long term to clean up the SMP locking interfaces.

Summary:
- I noticed waitpid_test stops with lc823450-xgevk:rndis
- The condition was CONFIG_DEBUG_ASSERTION=y
- Actually, the child task sent SIGCHILD but the parent couldn't catch the signal
- Then, I found that nx_waitid(), nx_waitpid() use sched_lock()
- However, a parent task and a child task are running on different CPUs
- So, sched_lock() is not enough and need to use a critical section
- Also, signal handling in nxtask_exithook() must be done in a critical section

Impact:
- SMP only

Testing:
- Tested with ostest with the following configurations
- lc823450-xgevk:rndis (CONFIG_DEBUG_ASSERTION=y and n)
- spresense:smp
- spresense:wifi_smp (NCPUS=2 and 4)
- sabre-6quad:smp (QEMU)
- esp32-core:smp (QEMU)
- maix-bit:smp (QEMU)
- sim:smp

Signed-off-by: Masayuki Ishikawa <[email protected]>
@btashton btashton merged commit ed25357 into apache:releases/10.0 Nov 15, 2020
@Ouss4 Ouss4 deleted the bp-2298 branch November 15, 2020 21:28
@masayuki2009
Copy link
Contributor

LGTM for the backport. We certainly still have more work to do long term to clean up the SMP locking interfaces.

Yes.

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.

3 participants