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/03/19 20:50:39 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request #3121: mm/heap: Move semaphore related declaration to private header

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


   ## Summary
   since other subsystem doesn't need call these function anymore. Follow up PR: https://github.com/apache/incubator-nuttx/pull/3086
   
   ## Impact
   No, the function implementation is same as before, but move to the internal header file.
   
   ## Testing
   Pass the CI build.
   


-- 
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] [incubator-nuttx] Ouss4 merged pull request #3121: mm/heap: Move semaphore related declaration to private header

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


   


-- 
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] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #3121: mm/heap: Move semaphore related declaration to private header

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #3121:
URL: https://github.com/apache/incubator-nuttx/pull/3121#discussion_r598216352



##########
File path: sched/init/nx_start.c
##########
@@ -762,12 +762,6 @@ void nx_start(void)
 
   DEBUGASSERT(this_cpu() == 0 && CONFIG_MAX_TASKS > CONFIG_SMP_NCPUS);
 
-  /* Take the memory manager semaphore on this CPU so that it will not be
-   * available on the other CPUs until we have finished initialization.
-   */
-
-  DEBUGVERIFY(kmm_trysemaphore());

Review comment:
       Yes, because the heap manager is fully workable in this stage. And the code test on a real SMP chip(2 Cortex A7)




-- 
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] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #3121: mm/heap: Move semaphore related declaration to private header

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #3121:
URL: https://github.com/apache/incubator-nuttx/pull/3121#discussion_r598216352



##########
File path: sched/init/nx_start.c
##########
@@ -762,12 +762,6 @@ void nx_start(void)
 
   DEBUGASSERT(this_cpu() == 0 && CONFIG_MAX_TASKS > CONFIG_SMP_NCPUS);
 
-  /* Take the memory manager semaphore on this CPU so that it will not be
-   * available on the other CPUs until we have finished initialization.
-   */
-
-  DEBUGVERIFY(kmm_trysemaphore());

Review comment:
       Yes, because the heap manager is fully workable in this stage. And the code test on a real SMP chip(2 Cortex A7).




-- 
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] [incubator-nuttx] Ouss4 commented on a change in pull request #3121: mm/heap: Move semaphore related declaration to private header

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on a change in pull request #3121:
URL: https://github.com/apache/incubator-nuttx/pull/3121#discussion_r598108264



##########
File path: arch/risc-v/src/common/riscv_idle.c
##########
@@ -74,15 +74,6 @@ void up_idle(void)
    * sleep in a reduced power mode until an interrupt occurs to save power
    */
 
-  /* This is a kludge that I still don't understand.  The call to

Review comment:
       @xiaoxiang781216 did you try to remove the "kludge"?
   It's this part:
   ```
   #ifdef CONFIG_SCHED_WORKQUEUE
     irqstate_t flags = enter_critical_section();
     leave_critical_section(flags);
   #endif
   ```
   This also could be another thing that came from the MIPS port.  We had this bug in MIPS where an interrupt mask wasn't set correctly and disabling/enabling interrupts was just clearing that mask, now it's fixed.
   
   RISC-V chips are using a custom idle loop that doesn't include this kludge.

##########
File path: sched/init/nx_start.c
##########
@@ -762,12 +762,6 @@ void nx_start(void)
 
   DEBUGASSERT(this_cpu() == 0 && CONFIG_MAX_TASKS > CONFIG_SMP_NCPUS);
 
-  /* Take the memory manager semaphore on this CPU so that it will not be
-   * available on the other CPUs until we have finished initialization.
-   */
-
-  DEBUGVERIFY(kmm_trysemaphore());

Review comment:
       Taking this semaphore is not necessary?




-- 
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] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #3121: mm/heap: Move semaphore related declaration to private header

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #3121:
URL: https://github.com/apache/incubator-nuttx/pull/3121#discussion_r598216352



##########
File path: sched/init/nx_start.c
##########
@@ -762,12 +762,6 @@ void nx_start(void)
 
   DEBUGASSERT(this_cpu() == 0 && CONFIG_MAX_TASKS > CONFIG_SMP_NCPUS);
 
-  /* Take the memory manager semaphore on this CPU so that it will not be
-   * available on the other CPUs until we have finished initialization.
-   */
-
-  DEBUGVERIFY(kmm_trysemaphore());

Review comment:
       Yes, because the heap manager is fully workable in this stage.




-- 
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] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #3121: mm/heap: Move semaphore related declaration to private header

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #3121:
URL: https://github.com/apache/incubator-nuttx/pull/3121#discussion_r598216146



##########
File path: arch/risc-v/src/common/riscv_idle.c
##########
@@ -74,15 +74,6 @@ void up_idle(void)
    * sleep in a reduced power mode until an interrupt occurs to save power
    */
 
-  /* This is a kludge that I still don't understand.  The call to

Review comment:
       Done, and remove other arch too, because I don't believe the empty critical section can have the real help.




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