|
From: Praveena G <pra...@sa...> - 2026-03-02 09:13:06
|
Hi Everyone, I hope you're doing well. I'm following up on my earlier email regarding performance considerations for sending SCSI commands using libusb vs. the UAS driver stack with io_uring. We would greatly appreciate and value any insights that you can share. Thanks in advance for your guidance. Best regards, Praveena G From: Praveena G Sent: Thursday, February 19, 2026 3:55 PM To: 'lib...@li...' <lib...@li...> Cc: Mayank Mishra <May...@sa...>; Vijay Mhapsekar <Vij...@sa...>; Rushabha Jain <rus...@sa...>; Hrithik Raj <hri...@sa...> Subject: Seeking Guidance on High-Speed SCSI Command Execution in Linux: libusb vs UAS Driver/IO_uring Performance Implications Hi Everyone, I hope this email finds you well. We are currently working on developing a solution in Linux to send SCSI commands in UAS and BOT mode, with our primary goal being to achieve high-speed performance. So far, we have explored a couple of promising approaches: one using libusb and the other leveraging the internal UAS driver stack in combination with io_uring. We have successfully implemented a proof of concept (POC) using libusb, which allows us to continuously send all SCSI commands. To achieve asynchronous transfer, we are utilizing the `libusb_fill_bulk_stream_transfer()` and `libusb_handle_events_completed()` APIs. However, we have a query regarding the performance implications of libusb operating in user space. Specifically, for each command, there are three context switches between the kernel and user space to provide callbacks for the command phase, data phase, and status phase. We are concerned that these context switches might slow down the overall performance. On the other hand, we understand that the underlying UAS driver stack can be directly accessed and used to send commands with a single API call, thereby reducing context switches. Additionally, the io_uring approach, which utilizes a shared ring buffer between user space and the kernel, minimizes system call overhead and could potentially offer faster performance. Given these considerations, we are curious about the potential advantages of using libusb in this scenario. Could you please help us understand the benefits of libusb and guide us on the best approach to achieve high-speed performance? We would greatly appreciate any suggestions or insights you could provide to help us improve our solution. Thank you in advance for your assistance and expertise. Best regards, Praveena G |