You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/11/09 17:56:23 UTC

[GitHub] [mynewt-core] nkaje opened a new pull request #2411: log: yield periodically while dumping logs

nkaje opened a new pull request #2411:
URL: https://github.com/apache/mynewt-core/pull/2411


   The logs are processed in the default task.
   In cases where there are a lot of logs to be
   processed, the idle task may get blocked from
   running, resulting in a watchdog bite. Address
   this by periodically putting ourselves on the
   sleep list.
   
   Signed-off-by: Naveen Kaje <na...@juul.com>


----------------------------------------------------------------
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.

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



[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2411: log: yield periodically while dumping logs

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot removed a comment on pull request #2411:
URL: https://github.com/apache/mynewt-core/pull/2411#issuecomment-724175605


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### sys/log/full/src/log_shell.c
   <details>
   
   ```diff
   @@ -96,8 +96,7 @@
        }
    
        console_write("\n", 1);
   -    if ((g_log_dump_count++) == 100)
   -    {
   +    if ((g_log_dump_count++) == 100) {
            g_log_dump_count = 0;
            /* Sleep for 5 ticks, to yield */
            os_time_delay(5);
   ```
   
   </details>


----------------------------------------------------------------
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.

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



[GitHub] [mynewt-core] kasjer commented on pull request #2411: log: yield periodically while dumping logs

Posted by GitBox <gi...@apache.org>.
kasjer commented on pull request #2411:
URL: https://github.com/apache/mynewt-core/pull/2411#issuecomment-731734995


   Maybe instead of yielding code could feed watchdog.
   If we have two tasks that are busy even if they go to sleep periodically it may happen that they will switch between them and idle will never feed watchdog.
   
   But it could be that watchdog is not initialized at all then feeding it could not be the right thing to do, but yielding without watchdog running will just make walk slower.
   


----------------------------------------------------------------
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.

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



[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2411: log: yield periodically while dumping logs

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on pull request #2411:
URL: https://github.com/apache/mynewt-core/pull/2411#issuecomment-724175605


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### sys/log/full/src/log_shell.c
   <details>
   
   ```diff
   @@ -96,8 +96,7 @@
        }
    
        console_write("\n", 1);
   -    if ((g_log_dump_count++) == 100)
   -    {
   +    if ((g_log_dump_count++) == 100) {
            g_log_dump_count = 0;
            /* Sleep for 5 ticks, to yield */
            os_time_delay(5);
   ```
   
   </details>


----------------------------------------------------------------
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.

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



[GitHub] [mynewt-core] benmccrea edited a comment on pull request #2411: log: yield periodically while dumping logs

Posted by GitBox <gi...@apache.org>.
benmccrea edited a comment on pull request #2411:
URL: https://github.com/apache/mynewt-core/pull/2411#issuecomment-745495044


   @nkaje When it yields to another task, will a problem occur if the new task creates a new log entry while the dump is still in progress? I think I agree with @kasjer that it would be preferable to feed the watchdog. Perhaps a MYNEWT_VAL could be checked to determine if the watchdog is enabled?


----------------------------------------------------------------
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.

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



[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2411: log: yield periodically while dumping logs

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on pull request #2411:
URL: https://github.com/apache/mynewt-core/pull/2411#issuecomment-724180545


   
   <!-- style-bot -->
   
   ## Style check summary
   
   #### No suggestions at this time!
   


----------------------------------------------------------------
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.

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



[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2411: log: yield periodically while dumping logs

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on pull request #2411:
URL: https://github.com/apache/mynewt-core/pull/2411#issuecomment-724179577


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### sys/log/full/src/log_shell.c
   <details>
   
   ```diff
   @@ -96,8 +96,7 @@
        }
    
        console_write("\n", 1);
   -    if ((++g_log_dump_count) == 100)
   -    {
   +    if ((++g_log_dump_count) == 100) {
            g_log_dump_count = 0;
            /* Sleep for 5 ticks, to yield */
            os_time_delay(5);
   ```
   
   </details>


----------------------------------------------------------------
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.

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



[GitHub] [mynewt-core] benmccrea commented on pull request #2411: log: yield periodically while dumping logs

Posted by GitBox <gi...@apache.org>.
benmccrea commented on pull request #2411:
URL: https://github.com/apache/mynewt-core/pull/2411#issuecomment-745495044


   @nkaje When it yields to another task, will a problem occur if the new task creates a new log entry while the dump is still in progress? 


----------------------------------------------------------------
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.

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



[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2411: log: yield periodically while dumping logs

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot removed a comment on pull request #2411:
URL: https://github.com/apache/mynewt-core/pull/2411#issuecomment-724179577


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### sys/log/full/src/log_shell.c
   <details>
   
   ```diff
   @@ -96,8 +96,7 @@
        }
    
        console_write("\n", 1);
   -    if ((++g_log_dump_count) == 100)
   -    {
   +    if ((++g_log_dump_count) == 100) {
            g_log_dump_count = 0;
            /* Sleep for 5 ticks, to yield */
            os_time_delay(5);
   ```
   
   </details>


----------------------------------------------------------------
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.

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