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

[GitHub] [incubator-nuttx] davids5 opened a new pull request #4872: stm32f7:sdmmc defer invalidate until after DMA completion

davids5 opened a new pull request #4872:
URL: https://github.com/apache/incubator-nuttx/pull/4872


   ## Summary
   
      The FAT was not coherent. Resulting in a write failed
      with errno:28 No space left on device.
   
      It is unclear how the memory is acesses prior to the DMA
      completion. But this restructuring ensures the data
      is coherent.
   
      This issue was not detected on the stm32h7
   ## Impact
   
   Random files system failures have been resolved.
   
   ## Testing
   
   px4_fmu-v5
   


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



[GitHub] [incubator-nuttx] davids5 commented on pull request #4872: stm32f7:sdmmc defer invalidate until after DMA completion

Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #4872:
URL: https://github.com/apache/incubator-nuttx/pull/4872#issuecomment-978427519


   @xiaoxiang781216 - Please merge this. 


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



[GitHub] [incubator-nuttx] hartmannathan commented on pull request #4872: stm32f7:sdmmc defer invalidate until after DMA completion

Posted by GitBox <gi...@apache.org>.
hartmannathan commented on pull request #4872:
URL: https://github.com/apache/incubator-nuttx/pull/4872#issuecomment-977993710


   I haven't grokked exactly what the problem is in this particular instance, but one possible issue may occur if buffers are not aligned *and* padded to exact D-Cache line boundaries. From my hazy memory on H7 that's 32 bytes; don't know on F7. I have been bitten by this one in the past:
   
   Why an issue may occur: The "invalidate D-cache" operation basically means "delete the contents of those cache lines." If any other data besides the DMA buffers falls within those cache lines, e.g., variables, newer values of those variables which are in the cache and not yet written to RAM will be lost, leaving older stale values in RAM.
   


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



[GitHub] [incubator-nuttx] davids5 commented on pull request #4872: stm32f7:sdmmc defer invalidate until after DMA completion

Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #4872:
URL: https://github.com/apache/incubator-nuttx/pull/4872#issuecomment-978094683


   @xiaoxiang781216 
   
   I tested  #4878 . It did not fix the issues here in. Moreover it looks incorrect see: https://github.com/apache/incubator-nuttx/pull/4878#pullrequestreview-815194027  it is over reaching and will corrupt adjacent data in a WB usage.
   
    
   
   ```
   commit ebc84faaba8973672d870eea2f18be727a84cb01 (HEAD -> px4_firmware_nuttx-10.1.0+-test-cac)
   Author: zhuyanlin <zh...@xiaomi.com>
   Date:   Tue Nov 23 20:27:32 2021 +0800
   
       arch:cache_invalidate: fix unalign cacheline invalidate
       
       Only invalidate may corrupt data in unalign start and end.
       Use writeback and invalidate instead.
       
       Signed-off-by: zhuyanlin <zh...@xiaomi.com>
   ```
   
   ```
   nsh> ver all
   HW arch: PX4_FMU_V5
   HW type: V500
   HW version: 0x00000000
   HW revision: 0x00000000
   FW git-hash: 8e3ee9f6cd9a912222fa187b496d0c033e150eec
   FW version: 1.13.0 0 (17629184)
   FW git-branch: master
   OS: NuttX
   OS version: 0.0.0 0 (0)
   OS git-hash: ebc84faaba8973672d870eea2f18be727a84cb01
   Build datetime: Nov 24 2021 09:31:19
   Build uri: localhost
   Build variant: default
   Toolchain: GNU GCC, 9.3.1 20200408 (release)
   PX4GUID: 000200000000363539373137510100340032
   MCU: STM32F76xxx, rev. Z
   nsh> ERROR [logger] write failed errno:28 (No space left on device), retrying
   ERROR [logger] write failed errno:28 (No space left on device), retrying
   ```
   


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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #4872: stm32f7:sdmmc defer invalidate until after DMA completion

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #4872:
URL: https://github.com/apache/incubator-nuttx/pull/4872#issuecomment-978007953


   Yes, this is what this patch want to fix, @hartmannathan .


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



[GitHub] [incubator-nuttx] davids5 commented on pull request #4872: stm32f7:sdmmc defer invalidate until after DMA completion

Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #4872:
URL: https://github.com/apache/incubator-nuttx/pull/4872#issuecomment-977934606


   @xiaoxiang781216 - I will test it in a few hrs.....


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



[GitHub] [incubator-nuttx] davids5 commented on pull request #4872: stm32f7:sdmmc defer invalidate until after DMA completion

Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #4872:
URL: https://github.com/apache/incubator-nuttx/pull/4872#issuecomment-978062527


   @xiaoxiang781216 I am trying to wrap my head around how the cache change would make any difference for a 32 byte aligned 512 buffer.


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



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #4872: stm32f7:sdmmc defer invalidate until after DMA completion

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #4872:
URL: https://github.com/apache/incubator-nuttx/pull/4872


   


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