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

Submitted by Kirill Tkhai on June 27, 2019, 2:11 p.m.

Details

Message ID 156164471320.20774.3722364430768510816.stgit@localhost.localdomain
State New
Series "ploop: Do not split discard bio in kaio"
Headers show

Commit Message

Kirill Tkhai June 27, 2019, 2:11 p.m.
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@virtuozzo.com>
---
 drivers/block/ploop/io_kaio.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

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)