[Devel] [PATCH rh7] ploop: Do not split discard bio in kaio

Kirill Tkhai ktkhai at virtuozzo.com
Thu Jun 27 17:11:57 MSK 2019


In maintaince mode only one discard bio is handled
concurrently. So, when we split it into set of
1 cluster size bios, they are handled very slow.
Remove splitting for maintaince mode based discard.

https://jira.sw.ru/browse/PSBM-95772

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/block/ploop/io_kaio.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/block/ploop/io_kaio.c b/drivers/block/ploop/io_kaio.c
index 9f391620a4f7..e0464e3a074d 100644
--- a/drivers/block/ploop/io_kaio.c
+++ b/drivers/block/ploop/io_kaio.c
@@ -1082,7 +1082,16 @@ static void kaio_unplug(struct ploop_io * io)
 static void kaio_queue_settings(struct ploop_io * io, struct request_queue * q)
 {
 	blk_set_stacking_limits(&q->limits);
-	ploop_set_discard_limits(io->plo);
+	/*
+	 * Maintaince mode based discard splits a big bio itself,
+	 * so we do not force block layer to split it.
+	 * Also it has a limitation, that only a single bio may be
+	 * handled at the same time, so splitting makes ploop working
+	 * slow. See process_discard_bio_queue() and
+	 *
+	 * https://jira.sw.ru/browse/PSBM-95772
+	 */
+	//ploop_set_discard_limits(io->plo);
 }
 
 static void kaio_issue_flush(struct ploop_io * io, struct ploop_request *preq)



More information about the Devel mailing list