-
Notifications
You must be signed in to change notification settings - Fork 1.5k
mm: handle take mm sem in IRQ #5504
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
Conversation
Signed-off-by: ligd <liguiding1@xiaomi.com>
pkarashchenko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
@GUIDINGLI The tests normally work for more than 10hrs. |
|
@GUIDINGLI |
|
No, I don't think this crash caused by this PR. There still have So, could you please run more test without this PR ? Guess will also have the problem. |
@GUIDINGLI By the way, did you test your SMP board ** with ** this PR? |
Currently just test with NON-SMP board, |
|
[ 18.868085] [CPU1] up_assert: Assertion failed CPU1 at file:mm_heap/mm_foreach.c line: 88 -- This seems like a memory corruption, someone overwrite ? |
@GUIDINGLI |
|
@masayuki2009 could you try this patch: #5539? |
Summary
mm: handle take mm sem in IRQ
In #5368 we remove the heap check in idle thread for performance, and don't allow user call sem_trywait in IRQ context.
But there is also have a debug feature in sched/irq/irq_dispatch.c, when tcb's flag TCB_FLAG_MEM_CHECK setted.
It also need call mm_takesemaphore -> sem_trywait in IRQ context.
So I used another way to handle this, that's is the patch.
Impact
mm take sem in IRQ
Testing
VELA