xiaoxiang781216 commented on code in PR #11092:
URL: https://github.com/apache/nuttx/pull/11092#discussion_r1375693938


##########
mm/mm_heap/mm.h:
##########
@@ -250,6 +250,7 @@ struct mm_heap_s
    * immdiately.
    */
 
+  spinlock_t mm_spinlock;

Review Comment:
   > If malloc/realloc only be called in non-interrupt context, it could be 
replace with spinlock. Do you have any benchmark to measure the time to select 
using spinlock or mutex?
   
   We saw 100x in no SMP case.
   
   > I just interest in why select mutex instead of spinlock.
   > 
   
   spinlock disables the interrupt, so the real-time become worse.
   
   > mutex will call enter_critical_section and it comsumes a lot of time.
   
   Yes.



-- 
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-unsubscr...@nuttx.apache.org

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

Reply via email to