-
Notifications
You must be signed in to change notification settings - Fork 1.5k
arch: change nxsched_suspend/resume_scheduler() called position #13651
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
for the citimon stats:
thread 0: thread 1:
enter_critical (t0)
up_switch_context
note suspend thread0 (t1)
thread running
IRQ happen, in ISR:
post thread0
up_switch_context
note resume thread0 (t2)
ISR continue f1
ISR continue f2
...
ISR continue fn
leave_critical (t3)
You will see, the thread 0, critical_section time is:
(t1 - t0) + (t3 - t2)
BUT, this result contains f1 f2 .. fn time spent, it is wrong
to tell user thead0 hold the critical lots of time but actually
not belong to it.
Resolve:
change the nxsched_suspend/resume_scheduler to real hanppends
Signed-off-by: ligd <liguiding1@xiaomi.com>
|
[Experimental Bot, please feedback here] NuttX PR Requirements ReviewMeets Requirements? Partially Summary: While the PR addresses a specific issue with the citimon statistics, the provided information lacks clarity and completeness. Strengths:
Weaknesses:
Recommendations:
By addressing these points, the PR will be much stronger and easier for reviewers to evaluate. |
| /* Update scheduler parameters */ | ||
|
|
||
| nxsched_suspend_scheduler(g_running_tasks[cpu]); | ||
| nxsched_resume_scheduler(tcb); |
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.
It seems that this PR will cause the task CET(Case Execution Time) to be worst, right?
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.
no, both functions are only used to collect the statistics info, don't influence the behavior. without the fix, critmonitor report the wrong value.
|
@GUIDINGLI |
|
Got it, thanks, I will fix it asap. |
|
Fix & fully test in: |
|
By the way, can you share your autotest script on QEMU, (all the qemu) Maybe we can integrate it to CI |
reason: Since the scheduling records have already been moved to the interrupt exit in this submission, we need to delete the original records' locations. This commit fixes the regression from apache#13651 Change-Id: I4b8ffe777ef98c818b72da09801bd5f588283924 Signed-off-by: hujun5 <hujun5@xiaomi.com>
reason: Since the scheduling records have already been moved to the interrupt exit in this submission, we need to delete the original records' locations. This commit fixes the regression from apache#13651 Signed-off-by: hujun5 <hujun5@xiaomi.com>
reason: Since the scheduling records have already been moved to the interrupt exit in this submission, we need to delete the original records' locations. This commit fixes the regression from #13651 Signed-off-by: hujun5 <hujun5@xiaomi.com>
reason: Since the scheduling records have already been moved to the interrupt exit in this submission, we need to delete the original records' locations. This commit fixes the regression from apache#13651 Signed-off-by: hujun5 <hujun5@xiaomi.com>
Summary
arch: change nxsched_suspend/resume_scheduler() called position
for the citimon stats:
You will see, the thread 0, critical_section time is: (t1 - t0) + (t3 - t2)
BUT, this result contains f1 f2 .. fn time spent, it is wrong to tell user thead0 hold the critical lots of time but actually not belong to it.
Resolve:
change the nxsched_suspend/resume_scheduler to real hanppends
Impact
critmon
Testing
qemu
./tools/configure.sh mps2-an500:nsh -j8