Swatantra-66 commented on code in PR #22228:
URL: https://github.com/apache/nuttx/pull/22228#discussion_r4670321217


##########
drivers/serial/Kconfig:
##########
@@ -254,10 +254,11 @@ config STANDARD_SERIAL
 
 config SERIAL_NPOLLWAITERS
        int "Number of poll threads"
+       default 2 if DEFAULT_SMALL

Review Comment:
   On memory-constrained configurations (DEFAULT_SMALL=y), serial console 
interactions are typically simple and low-concurrency: only stdin is polled for 
incoming data (POLLIN), while stdout and stderr writes are blocking/synchronous 
rather than polled for POLLOUT by separate threads.
   
   Having 2 waiter slots provides enough headroom for typical embedded use 
cases (e.g. an NSH shell or application thread plus a background task) while 
saving 8 bytes of SRAM per UART device on 32-bit MCUs (16 bytes on 
stm32f103-minimum:nsh).
   
   Do you think 2 is a reasonable default for DEFAULT_SMALL, or would you 
prefer keeping a unified default of 4 (or changing the global default to 2)?



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