sched/hrtimer: Some improvements. #17848
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This main changes of this PR include:
Removed
nxsched_tick_expiration()function: The tick expiration logic has been integrated intonxsched_process_timer()to simplify the scheduler architecture. Previously,nxsched_tick_expiration()was called from platform-specific code when the tickless timer expired, but now this functionality is handled directly withinnxsched_process_timer().Simplified hrtimer API:
hrtimer_start()to accept the callback function as a parameter instead of storing it during initialization. The hrtimer is designed to replace the wdog timer in future, so it should have the callback function in its API. The evaluation results showed there is no any performance degradation since the CPU pipeline can hide the latency.typedefforhrtimer_tandhrtimer_node_tUpdated documentation: All references to
nxsched_tick_expiration()in documentation have been updated tonxsched_process_timer(). Additionally, outdated documentation for watchdog timer functions (wd_restart()andwd_restart_next()) has been removed, and high-resolution timer (hrtimer) documentation has been updated to reflect API changes.Impact
Documentation:
Performance:
Testing
Tested on
rv-virt:smp,ostestpassed