anchao commented on code in PR #20686:
URL: https://github.com/apache/nuttx/pull/20686#discussion_r4389883233


##########
libs/zblue/CMakeLists.txt:
##########
@@ -0,0 +1,40 @@
+# 
##############################################################################
+# libs/zblue/CMakeLists.txt

Review Comment:
   Another important point is performance in Flat mode.                         
  
                                                                                
  
   For many low-frequency IoT chips, running the Bluetooth host stack close to 
the
   kernel/lower-half driver path has very visible benefits: fewer context       
  
   switches, fewer data copies, and less scheduling overhead between the HCI    
  
   driver, buffer management, protocol state machine, and upper layers.         
  
                                                                                
  
   Bluetooth is also very latency-sensitive. Having direct access to NuttX 
kernel 
   primitives such as interrupt control, lower-level locks, work queues, 
signals, 
   and timing APIs allows the stack to make better use of the hardware and 
reduce 
   overhead on constrained devices.                                             
  
                                                                                
  
   @casaroli  I think you know this tradeoff very well from your optimization 
in   
   the event notification path:                                                 
  
   https://github.com/apache/nuttx/pull/20387                                   
  
                                                                                
  
   Even removing one extra function indirection or one unnecessary interrupt    
  
   disable/enable pair can matter on small MCUs. For the same reason, putting 
the 
   Bluetooth host stack on the kernel-side path gives us a more practical       
  
   performance baseline for the main NuttX IoT use case, especially in Flat 
mode. 
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to