raiden00pl opened a new pull request, #19753: URL: https://github.com/apache/nuttx/pull/19753
## Summary Since 00010089b8 uart_writev() takes the data one byte at a time with uio_copyto() plus uio_advance(). Both of them walk the iovec list and redo the byte counters for every single byte, so most of the work is bookkeeping rather than copying. On slow cores this is what limits how fast the TX buffer can be filled. Take a pointer to the current iovec segment and read the bytes straight from it, and move the uio forward once per segment instead of once per byte. nseg counts only the bytes that really went into the buffer: it is increased at the end of a loop pass, and that step is skipped when uart_putxmitchar() fails. ## Impact improve serial driver performances ## Testing Measured on nRF52840 (Cortex-M4, 64 MHz), 8 MiB write() to a CDC/ACM port: 223 KB/s to 481 KB/s. -- 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]
