[Devel] [RFC PATCH vz9 v5 49/49] dm-ploop: disable fast path
Alexander Atanasov
alexander.atanasov at virtuozzo.com
Mon Nov 18 09:25:16 MSK 2024
*** JUST FOR TESTING - NOT TO BE APPLIED ***
Fast path results in rcu lockups and hangs.
The reason is that we got called from fs,
then we try to re-enter the fs but fs is not ready for this.
There is an idea to investigate - try to skip dispatcher thread
and directly execute in a runner thread.
Signed-off-by: Alexander Atanasov <alexander.atanasov at virtuozzo.com>
---
drivers/md/dm-ploop-map.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index dc9fb36ded3f..9ffe41fa4c02 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -2308,8 +2308,14 @@ static void ploop_submit_embedded_pio(struct ploop *ploop, struct pio *pio)
}
ploop_prepare_one_embedded_pio(ploop, pio, &deferred_pios);
- /* check if result is a single pio , so we can try fast path */
- if (deferred_pios.first && deferred_pios.first->next == NULL) {
+ /*
+ * Disable fast path due to rcu lockups fs -> ploop -> fs - fses are not reentrant
+ * we can however try another fast path skip dispatcher thread and pass directly to
+ * runners
+ */
+#define ENABLE_FAST_PATH 0
+ /* check if result is a single pio, if so we can try fast path */
+ if (ENABLE_FAST_PATH && deferred_pios.first && deferred_pios.first->next == NULL) {
spio = list_entry((struct list_head *)deferred_pios.first, typeof(*spio), list);
INIT_LIST_HEAD(&spio->list);
if (req_op(rq) == REQ_OP_READ) {
--
2.43.0
More information about the Devel
mailing list