From: "Denis V. Lunev" <den@openvz.org>
To: andrey.zhadchenko@virtuozzo.com, alexander.ivanov@virtuozzo.com,
vasileios.almpanis@virtuozzo.com
Cc: devel@openvz.org
Subject: [Devel] [PATCH hci-8.2 8/9] dm-ploop: requeue requests when the request pool is empty
Date: Wed, 25 Nov 2026 02:25:24 +0100 [thread overview]
Message-ID: <20261125012525.681662-9-den@openvz.org> (raw)
In-Reply-To: <20261125012525.681662-1-den@openvz.org>
From: Denis V. Lunev <den@openvz.org>
The next commit disables the default I/O scheduler for devices that
ploop_dmcreate_stub() creates with a zero-rq table. Loading a ploop
table later keeps that scheduler setting, so the device can have more
requests in flight than the 512-entry reserve sized for mq-deadline.
If the reserve is empty and GFP_ATOMIC allocation fails,
ploop_clone_and_map() kills the request with an I/O error. Requeue it
so blk-mq retries when resources are available.
https://virtuozzo.atlassian.net/browse/VSTOR-95494
Feature: dm-ploop: ploop target driver
Signed-off-by: Denis V. Lunev <den@openvz.org>
---
drivers/md/dm-ploop-map.c | 2 +-
drivers/md/dm-ploop.h | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index c62b414862b1..827346e037b0 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -2663,7 +2663,7 @@ int ploop_clone_and_map(struct dm_target *ti, struct request *rq,
prq = mempool_alloc(ploop->prq_pool, GFP_ATOMIC);
if (!prq)
- return DM_MAPIO_KILL;
+ return DM_MAPIO_REQUEUE;
pio = (void *)prq + sizeof(*prq);
ploop_init_prq_and_embedded_pio(ploop, rq, prq, pio);
diff --git a/drivers/md/dm-ploop.h b/drivers/md/dm-ploop.h
index 093b7f9397a4..660e4d3531b8 100644
--- a/drivers/md/dm-ploop.h
+++ b/drivers/md/dm-ploop.h
@@ -164,7 +164,8 @@ struct ploop {
struct wait_queue_head dispatcher_wq_data;
struct wait_queue_head dispatcher_wq_fsync;
struct dm_target *ti;
-#define PLOOP_PRQ_POOL_SIZE 512 /* Twice nr_requests from blk_mq_init_sched() */
+/* Reserve to keep requests moving when slab allocations fail. */
+#define PLOOP_PRQ_POOL_SIZE 512
mempool_t *prq_pool;
#define PLOOP_PIO_POOL_SIZE 512
mempool_t *pio_pool;
--
2.55.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-25 1:27 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 1:25 [Devel] [PATCH hci-8.2 0/9] dm-qcow2: lockless fast path, direct completion, no I/O scheduler Denis V. Lunev
2026-11-25 1:25 ` [Devel] [PATCH hci-8.2 1/9] dm-qcow2: move md_pages_lock off the deferred_lock cache line Denis V. Lunev
2026-12-01 0:05 ` no-reply
2026-11-25 1:25 ` [Devel] [PATCH hci-8.2 2/9] dm-qcow2: free md pages after an RCU grace period Denis V. Lunev
2026-11-25 11:19 ` Konstantin Khorenko
2026-12-01 0:06 ` no-reply
2026-11-25 1:25 ` [Devel] [PATCH hci-8.2 3/9] dm-qcow2: map fast path reads without md_pages_lock Denis V. Lunev
2026-11-25 11:19 ` Konstantin Khorenko
2026-12-01 0:17 ` no-reply
2026-11-25 1:25 ` [Devel] [PATCH hci-8.2 4/9] dm-qcow2: map fast path writes " Denis V. Lunev
2026-11-25 11:19 ` Konstantin Khorenko
2026-12-01 0:25 ` no-reply
2026-11-25 1:25 ` [Devel] [PATCH hci-8.2 5/9] dm-qcow2: submit fast path qios without deferred_lock Denis V. Lunev
2026-12-01 0:27 ` no-reply
2026-11-25 1:25 ` [Devel] [PATCH hci-8.2 6/9] dm-rq: complete dm-qcow2 requests directly in task context Denis V. Lunev
2026-11-25 11:19 ` Konstantin Khorenko
2026-12-01 0:35 ` no-reply
2026-11-25 1:25 ` [Devel] [PATCH hci-8.2 7/9] dm-qcow2: requeue requests when the request pool is empty Denis V. Lunev
2026-12-01 0:37 ` no-reply
2026-11-25 1:25 ` Denis V. Lunev [this message]
2026-11-25 11:19 ` [Devel] [PATCH hci-8.2 8/9] dm-ploop: " Konstantin Khorenko
2026-12-01 0:38 ` no-reply
2026-11-25 1:25 ` [Devel] [PATCH hci-8.2 9/9] dm: default dm-qcow2 devices to no I/O scheduler Denis V. Lunev
2026-11-25 11:19 ` Konstantin Khorenko
2026-12-01 0:39 ` no-reply
2026-11-25 11:19 ` [Devel] [PATCH hci-8.2 0/9] dm-qcow2: lockless fast path, direct completion, " Konstantin Khorenko
2026-11-26 13:58 ` Andrey Zhadchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261125012525.681662-9-den@openvz.org \
--to=den@openvz.org \
--cc=alexander.ivanov@virtuozzo.com \
--cc=andrey.zhadchenko@virtuozzo.com \
--cc=devel@openvz.org \
--cc=vasileios.almpanis@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox