public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* ublk: RFC fetch_req_multishot
@ 2025-04-24 18:19 Ofer Oshri
  2025-04-24 18:28 ` Caleb Sander Mateos
  2025-04-25  4:10 ` Ming Lei
  0 siblings, 2 replies; 9+ messages in thread
From: Ofer Oshri @ 2025-04-24 18:19 UTC (permalink / raw)
  To: linux-block@vger.kernel.org
  Cc: ming.lei@redhat.com, axboe@kernel.dk, Jared Holzman, Yoav Cohen,
	Guy Eisenberg, Omri Levi

Hi,

Our code uses a single io_uring per core, which is shared among all block devices - meaning each block device on a core uses the same io_uring.

Let’s say the size of the io_uring is N. Each block device submits M UBLK_U_IO_FETCH_REQ requests. As a result, with the current implementation, we can only support up to P block devices, where P = N / M. This means that when we attempt to support block device P+1, it will fail due to io_uring exhaustion.

To address this, we’d like to propose an enhancement to the ublk driver. The idea is inspired by the multi-shot concept, where a single request allows multiple replies.

We propose adding:

1. A method to register a pool of ublk_io commands.

2. Introduce a new UBLK_U_IO_FETCH_REQ_MULTISHOT operation, where a pool of ublk_io commands is bound to a block device. Then, upon receiving a new BIO, the ublk driver can select a reply from the pre-registered pool and push it to the io_uring.

3. Introduce a new UBLK_U_IO_COMMIT_REQ command to explicitly mark the completion of a request. In this case, the ublk driver returns the request to the pool.  We can retain the existing UBLK_U_IO_COMMIT_AND_FETCH_REQ command, but for multi-shot scenarios, the “FETCH” operation would simply mean returning the request to the pool.

What are your thoughts on this approach?

Ofer

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

end of thread, other threads:[~2025-06-06 12:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-24 18:19 ublk: RFC fetch_req_multishot Ofer Oshri
2025-04-24 18:28 ` Caleb Sander Mateos
2025-04-24 19:07   ` Ofer Oshri
     [not found]   ` <IA1PR12MB60672D37508D641368D211B8B6852@IA1PR12MB6067.namprd12.prod.outlook.com>
2025-04-24 19:07     ` Caleb Sander Mateos
2025-04-24 21:07       ` Jared Holzman
2025-04-24 21:52         ` Caleb Sander Mateos
2025-04-25  5:23       ` Ming Lei
2025-06-06 12:03         ` Ming Lei
2025-04-25  4:10 ` Ming Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox