Hi Ming, On 2023-02-13 13:40, Ming Lei wrote: >>> >>> Can you share perf data on other non-io_uring engine often used? The >>> thing is that we still have lots of non-io_uring workloads, which can't >>> be hurt now. >>> >> Sounds good. Does psync and libaio along with io_uring suffice? > > Yeah, it should be enough. > Performance regression is noticed for libaio and psync. I did the same tests on null_blk with bio and blk-mq backends, and noticed a similar pattern. Should we add a module parameter to switch between bio and blk-mq back-end in brd, similar to null_blk? The default option would be bio to avoid regression on existing workloads. There is a clear performance gain for some workloads with blk-mq support in brd. Let me know your thoughts. See below the performance results. Results for brd with --direct enabled: +-----------+-----------+--------+--------+ | io_uring | bio(base) | blk-mq | delta | +-----------+-----------+--------+--------+ | read | 189 | 449 | 137.57 | | randread | 182 | 419 | 130.22 | | write | 442 | 425 | -3.85 | | randwrite | 377 | 384 | 1.86 | +-----------+-----------+--------+--------+ +-----------+-----------+--------+--------+ | libaio | bio(base) | blk-mq | delta | +-----------+-----------+--------+--------+ | read | 415 | 339 | -18.31 | | randread | 392 | 325 | -17.09 | | write | 410 | 340 | -17.07 | | randwrite | 371 | 318 | -14.29 | +-----------+-----------+--------+--------+ +-----------+-----------+--------+--------+ | psync | bio(base) | blk-mq | delta | +-----------+-----------+--------+--------+ | read | 700 | 554 | -20.86 | | randread | 633 | 497 | -21.48 | | write | 705 | 181 | -74.33 | | randwrite | 598 | 169 | -71.74 | +-----------+-----------+--------+--------+ Both libaio and psync results in performance regression with blk-mq based brd. Results for memory-backed null_blk device with --direct enabled: +-----------+-----------+--------+--------+ | io_uring | bio(base) | blk-mq | delta | +-----------+-----------+--------+--------+ | read | 189 | 433 | 129.1 | | randread | 196 | 408 | 108.16 | | write | 457 | 414 | -9.41 | | randwrite | 356 | 350 | -1.69 | +-----------+-----------+--------+--------+ +-----------+-----------+--------+--------+ | libaio | bio(base) | blk-mq | delta | +-----------+-----------+--------+--------+ | read | 406 | 341 | -16.01 | | randread | 378 | 320 | -15.34 | | write | 404 | 331 | -18.07 | | randwrite | 359 | 309 | -13.93 | +-----------+-----------+--------+--------+ +-----------+-----------+--------+--------+ | psync | bio(base) | blk-mq | delta | +-----------+-----------+--------+--------+ | read | 684 | 522 | -23.68 | | randread | 605 | 470 | -22.31 | | write | 676 | 139 | -79.44 | | randwrite | 558 | 135 | -75.81 | +-----------+-----------+--------+--------+ Regards, Pankaj