yamt commented on PR #15604: URL: https://github.com/apache/nuttx/pull/15604#issuecomment-2601357658
> > does it actually improve the performance much? otherwise, i'm against it. as far as we want to support readv/writev, it's simpler always to use iovecs. > > the original plan was that eventually deprecate read/write in file_operations. this change would make it impossible. > > while nonblock trick might be ok for the serial driver, it is not so generic. eg. it won't work for files which needs to preserve data boundaries or files which needs to provide read/write atomicity. > > This patch provides 2 optimizations > > 1. For scenarios that do not support writev/readv and iovcnt == 1, use simpler read and write operations. Not all read and write operations for vfs need to apply uio overhead > > 2. Serial port devices can maintain single-byte read and write, and uio is too complicated > > > The advantage of nuttx rtos is that which could run on a chip with a very low frequency (50MHz). On the critical path, we need to further reduce the interference of complex frameworks. You will find that many people in the community are working on inline function and simplifying the function call process. **Each cycle is very important for MCU devices** correctness, simplicity, code size, maintainability, etc are also important. i'm just not convinced this PR provides a better trade-off. maybe you can convince me eg. by providing some numbers. also, i'm not sure about your "too complicated" claim. having a separate fast path seems to make it more complicated to me. -- 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