-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[EXPERIMENTAL]sched/hrtimer: hrtimer state machine improvement for SMP cases #17642
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
742782b to
f475319
Compare
f475319 to
7c27ef8
Compare
7c27ef8 to
6ba659c
Compare
b1ed47e to
c91948a
Compare
c91948a to
dc9a2b7
Compare
dc9a2b7 to
bc161b5
Compare
56d272e to
a55ce95
Compare
a55ce95 to
ac5656a
Compare
ac5656a to
92ecafb
Compare
92ecafb to
88da009
Compare
88da009 to
8c4a430
Compare
8c4a430 to
26c6cf7
Compare
Allow running/armed hrtimer to be restarted to fix hrtimer bug: apache#17567 Co-authored-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Update the hrtimer documentation to describe the hrtimer state machine,
which is introduced to handle safe cancellation and execution in SMP
environments.
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
26c6cf7 to
0ae6d78
Compare
GUIDINGLI
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.
The PR received many-approving from PMCs and committers, I don't think there is any problem to merge it firstly. We can working to improve it. It was also improvement for my initial PR three months ago Besides, I am too busy recently to work on this any more, Looking forward to your continue work on queue abstraction for hrtimer. |
@wangchdo |
Summary
This PR is also included in #17573. Since #17573 covers both overall scheduler support with hrtimer and related hrtimer improvements for SMP mode, and since hrtimer is an independent module, this change is submitted separately to focus on hrtimer improvements and avoid conflicts with other scheduler-related enhancements such as #17640.
This PR refines the hrtimer state machine to allow ARMED and RUNNING hrtimers to be safely restarted, and fixes several corner-case issues in SMP mode.
The updated hrtimer state machine is shown below and is also documented in the hrtimer module documentation:
Impact
Improments for the hrtimer module
Testing
Test 1 passed (integrated in ostest):
- test implementation:
test log on rv-virt:smp64:
test 2 passed (provided by @Fix-Point )
test implementation
test passed log on rv-virt:smp64
test 3 passed (provided by @Fix-Point )
test implementation
test passed log on rv-virt:smp64
test 4 passed (provided by @Fix-Point )
test implementation
test passed log on rv-virt:smp64