All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] ublk: speed up ublk server exit handling
@ 2025-07-04  5:41 Uday Shankar
  2025-07-04  5:41 ` [PATCH v2 1/2] " Uday Shankar
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Uday Shankar @ 2025-07-04  5:41 UTC (permalink / raw)
  To: Ming Lei, Jens Axboe, Caleb Sander Mateos
  Cc: linux-block, linux-kernel, Uday Shankar

Recently, we've observed a few cases where a ublk server is able to
complete restart more quickly than the driver can process the exit of
the previous ublk server. The new ublk server comes up, attempts
recovery of the preexisting ublk devices, and observes them still in
state UBLK_S_DEV_LIVE. While this is possible due to the asynchronous
nature of io_uring cleanup and should therefore be handled properly in
the ublk server, it is still preferable to make ublk server exit
handling faster if possible, as we should strive for it to not be a
limiting factor in how fast a ublk server can restart and provide
service again.

The first patch contains the functional change that speeds up the exit
handling, and the second factors out a repeating and error-prone pattern
into a helper.

Signed-off-by: Uday Shankar <ushankar@purestorage.com>
---
Changes in v2:
- Added back ublk_queue::canceling to minimize number of cache lines
  accessed by hot path (Ming Lei)
- Added a ublk_set_canceling helper
- Link to v1: https://lore.kernel.org/r/20250627-ublk_too_many_quiesce-v1-1-55ef9d80a6af@purestorage.com

---
Uday Shankar (2):
      ublk: speed up ublk server exit handling
      ublk: introduce and use ublk_set_canceling helper

 drivers/block/ublk_drv.c | 76 ++++++++++++++++++++++++++++++------------------
 1 file changed, 48 insertions(+), 28 deletions(-)
---
base-commit: e74a1c6a8e8af2422fce125c29b14f1d3fab5b5c
change-id: 20250627-ublk_too_many_quiesce-937d6c36ce46

Best regards,
-- 
Uday Shankar <ushankar@purestorage.com>


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

end of thread, other threads:[~2025-07-04 15:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-04  5:41 [PATCH v2 0/2] ublk: speed up ublk server exit handling Uday Shankar
2025-07-04  5:41 ` [PATCH v2 1/2] " Uday Shankar
2025-07-04 12:35   ` Ming Lei
2025-07-04 13:21   ` Caleb Sander Mateos
2025-07-04  5:41 ` [PATCH v2 2/2] ublk: introduce and use ublk_set_canceling helper Uday Shankar
2025-07-04 12:36   ` Ming Lei
2025-07-04 13:30   ` Caleb Sander Mateos
2025-07-04 15:31 ` [PATCH v2 0/2] ublk: speed up ublk server exit handling Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.