You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@mynewt.apache.org by "kasjer (via GitHub)" <gi...@apache.org> on 2026/10/23 11:43:16 UTC

[PR] sys/shell: Fix uptime load for OS_TASK_RUN_TIME_CPUTIME [mynewt-core]

kasjer opened a new pull request, #3828:
URL: https://github.com/apache/mynewt-core/pull/3828

   When OS_TASK_RUN_TIME_CPUTIME is set, task run time is counted in cputime ticks (OS_CPUTIME_FREQ) while uptime load computation divided it by OS ticks, producing bogus load values.  Run time is also only 32 bits, so with 1 MHz cputime it wraps every ~71 minutes, and idle_ticks * 100 overflowed in 32-bit arithmetic.
   
   Use the unit that matches the run time configuration, accumulate idle task run time in 64 bits from the per-minute load monitor, and compute total load from os_get_uptime() in the same unit.
   
   Assisted-by: Claude:claude-opus-5-5


-- 
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: notifications-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] sys/shell: Fix uptime load for OS_TASK_RUN_TIME_CPUTIME [mynewt-core]

Posted by "kasjer (via GitHub)" <gi...@apache.org>.
kasjer merged PR #3828:
URL: https://github.com/apache/mynewt-core/pull/3828


-- 
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: notifications-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org