You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "fjpanag (via GitHub)" <gi...@apache.org> on 2023/08/04 19:25:29 UTC

[GitHub] [nuttx] fjpanag opened a new issue, #10090: Schedulling issues with tickless.

fjpanag opened a new issue, #10090:
URL: https://github.com/apache/nuttx/issues/10090

   NuttX in tickless mode is not working correctly, with a severe possibility of at least some threads getting stuck.
   
   The issue appears to be that a task may be scheduled at just 1 tick in the future, and the current logic cannot handle this.
   
   As the arch logic is trying to set up an alarm, the timer is still running.  
   It can happen that simultaneously with the scheduling logic, the timer advances by a tick.  
   In this case, the value stored in the alarm may now be in the past, so a full timer-range overflow is needed for the task to be actually scheduled in.
   
   This is applicable for *at least* some architectures, if not all.  
   I have personally tried on an STM32F427, and I found the system unusable. It's almost certain that scheduling will fail within the first few seconds of operation.
   
   There was a discussion in the mailing list, containing more information. See [here](https://lists.apache.org/thread/rx59lz5wo72btg8cv4lk3pb19vmx4kks).
   
   The mentioned PR is #9546.
   
   Unfortunately, no proper solution was agreed upon, so this is still pending.
   


-- 
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: commits-unsubscribe@nuttx.apache.org.apache.org

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


Re: [I] Schedulling issues with tickless. [nuttx]

Posted by "maxikrie (via GitHub) via commits" <co...@nuttx.apache.org>.
maxikrie commented on issue #10090:
URL: https://github.com/apache/nuttx/issues/10090#issuecomment-6799084124

   @acassis @fjpanag 
   I think this is fixed for STM32 by #20173 (09423194bf, "fix compare-match race and zero-period hang in tickless"). After programming CCR it checks whether the counter already reached the compare value and, if so, forces the event through EGR instead of waiting for a full rollover, which is the race described here. It covers the F1/F2/F3/F4/G4 driver (`common/stm32/stm32_tickless_m3m4_v1.c`, so the F427 above), F7, H7 and WB. On H7 it fixed #16829 (usleep hanging in tickless on a NUCLEO-H753ZI). Can this be closed, or does anyone still see it on another arch?


-- 
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: commits-unsubscribe@nuttx.apache.org

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


Re: [I] Schedulling issues with tickless. [nuttx]

Posted by "xiaoxiang781216 (via GitHub) via commits" <co...@nuttx.apache.org>.
xiaoxiang781216 closed issue #10090: Schedulling issues with tickless.
URL: https://github.com/apache/nuttx/issues/10090


-- 
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: commits-unsubscribe@nuttx.apache.org

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