linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V4 0/6] loop: improve loop aio perf by IOCB_NOWAIT
@ 2025-09-28 13:29 Ming Lei
  2025-09-28 13:29 ` [PATCH V4 1/6] loop: add helper lo_cmd_nr_bvec() Ming Lei
                   ` (6 more replies)
  0 siblings, 7 replies; 22+ messages in thread
From: Ming Lei @ 2025-09-28 13:29 UTC (permalink / raw)
  To: Jens Axboe, linux-block
  Cc: Mikulas Patocka, Zhaoyang Huang, Dave Chinner, linux-fsdevel,
	Ming Lei

Hello Jens,

This patchset improves loop aio perf by using IOCB_NOWAIT for avoiding to queue aio
command to workqueue context, meantime refactor lo_rw_aio() a bit.

In my test VM, loop disk perf becomes very close to perf of the backing block
device(nvme/mq virtio-scsi).

And Mikulas verified that this way can improve 12jobs sequential rw io by
~5X, and basically solve the reported problem together with loop MQ change.

https://lore.kernel.org/linux-block/a8e5c76a-231f-07d1-a394-847de930f638@redhat.com/

Zhaoyang Huang also mentioned it may fix their performance issue on Android
use case.

The loop MQ change will be posted as standalone patch, because it needs
losetup change.

V4:
	- rebase
	- re-organize and make it more readable 

V3:
	- add reviewed-by tag
	- rename variable & improve commit log & comment on 5/5(Christoph)

V2:
	- patch style fix & cleanup (Christoph)
	- fix randwrite perf regression on sparse backing file
	- drop MQ change


Ming Lei (6):
  loop: add helper lo_cmd_nr_bvec()
  loop: add helper lo_rw_aio_prep()
  loop: add lo_submit_rw_aio()
  loop: move command blkcg/memcg initialization into loop_queue_work
  loop: try to handle loop aio command via NOWAIT IO first
  loop: add hint for handling aio via IOCB_NOWAIT

 drivers/block/loop.c | 227 +++++++++++++++++++++++++++++++++++--------
 1 file changed, 188 insertions(+), 39 deletions(-)

-- 
2.47.0


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2025-10-13  8:26 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-28 13:29 [PATCH V4 0/6] loop: improve loop aio perf by IOCB_NOWAIT Ming Lei
2025-09-28 13:29 ` [PATCH V4 1/6] loop: add helper lo_cmd_nr_bvec() Ming Lei
2025-10-03  7:04   ` Christoph Hellwig
2025-09-28 13:29 ` [PATCH V4 2/6] loop: add helper lo_rw_aio_prep() Ming Lei
2025-10-03  7:04   ` Christoph Hellwig
2025-09-28 13:29 ` [PATCH V4 3/6] loop: add lo_submit_rw_aio() Ming Lei
2025-10-03  7:04   ` Christoph Hellwig
2025-09-28 13:29 ` [PATCH V4 4/6] loop: move command blkcg/memcg initialization into loop_queue_work Ming Lei
2025-09-28 13:29 ` [PATCH V4 5/6] loop: try to handle loop aio command via NOWAIT IO first Ming Lei
2025-09-29  6:44   ` Yu Kuai
2025-09-29  9:18     ` Ming Lei
2025-09-28 13:29 ` [PATCH V4 6/6] loop: add hint for handling aio via IOCB_NOWAIT Ming Lei
2025-10-03  7:06   ` Christoph Hellwig
2025-10-06 14:18     ` Ming Lei
2025-10-07  6:33       ` Christoph Hellwig
2025-10-07 12:15         ` Ming Lei
2025-10-08  5:56           ` Christoph Hellwig
2025-10-09  1:25             ` Ming Lei
2025-10-13  6:26               ` Christoph Hellwig
2025-10-13  8:26                 ` Ming Lei
2025-09-28 18:42 ` [syzbot ci] Re: loop: improve loop aio perf by IOCB_NOWAIT syzbot ci
2025-09-29  1:13   ` Ming Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).