huojianchaoyy opened a new pull request, #21745:
URL: https://github.com/apache/nuttx/pull/21745

   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   ## Summary
   Split out of #21708 as requested. Follow-up to #21429 (@casaroli).
   
   Since b1184370416 ("sched/critmon: Warn about the busy-wait time only above 
a positive limit.") `SCHED_CRITMONITOR_MAXTIME_BUSYWAIT` works like the other 
`SCHED_CRITMONITOR_MAXTIME_xxx` options: 0 keeps the busy-wait statistics 
without any warning, a positive value also warns above that limit, and -1 
leaves the statistics out. The help text still said "-1 means disabled". This 
updates it; `Documentation/os/interrupts/critical_sections.rst` already 
describes the three cases.
   
   ## Impact
   Help text only. No code, build or configuration change.
   
   ## Testing
   Host: Ubuntu 22.04 x86_64, GCC 13.4.0, CMake 3.23 + Ninja. Target: `sim:nsh` 
with `CONFIG_SCHED_CRITMONITOR=y`.
   
   `./tools/checkpatch.sh -c -u -m -g HEAD~1..HEAD` passes.
   
   `/proc/critmon` matches the new help text. With 
`CONFIG_SCHED_CRITMONITOR_MAXTIME_BUSYWAIT=0` the CPU line has the busy-wait 
maximum, total and share, and no "wait for critical section or spinlock too 
long" warning is printed:
   ```
   nsh> cat /proc/critmon
   0,0.000008902,0.001370585  0.0456%
   ```
   With the default -1 there are no busy-wait statistics:
   ```
   nsh> cat /proc/critmon
   0
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

  • [PR] sched/Kconfig: document ... huojianchaoyy (via GitHub) via commits

Reply via email to