Skip to content

Conversation

@wangzhi16
Copy link
Contributor

Summary

Add configuration "CONFIG_SCHED_CRITMONITOR_MAXTIME_BUSYWAIT", which can record the busy waiting time to get spinlock or enter critical section.

Impact

None

Testing

CONFIG_SCHED_CRITMONITOR=y
CONFIG_SCHED_CRITMONITOR_MAXTIME_BUSYWAIT>=0

ostest PASS

…get spinlock or enter critical section.

Add configuration "CONFIG_SCHED_CRITMONITOR_MAXTIME_BUSYWAIT", which can record the busy waiting time to get spinlock or enter critical section.

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
@github-actions github-actions bot added Area: File System File System issues Area: OS Components OS Components issues Size: M The size of the change in this PR is medium labels Jan 21, 2026
Because enter_critical_section() changes from calling spin_lock() to calling spin_lock_wo_note(), it is necessary to count the busywait time in enter_critical_section() additionally.

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
Copy link
Contributor

@acassis acassis left a comment

Choose a reason for hiding this comment

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

@wangzhi16 nice feature! And as all new features we need some Documentation about it, please include it here: https://nuttx.apache.org/docs/latest/implementation/critical_sections.html

@jerpelea jerpelea changed the title Add configuration to record the busy waiting time to get spinlock or enter critical section. sched: add configuration to record the busy waiting time to get spinlock or enter critical section. Jan 22, 2026
@jerpelea jerpelea changed the title sched: add configuration to record the busy waiting time to get spinlock or enter critical section. sched: add configuration to record the busy waiting time Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: File System File System issues Area: OS Components OS Components issues Size: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants