[RHEL7,COMMIT] ploop: Do not split discard bio in kaio

Submitted by Konstantin Khorenko on July 1, 2019, 8:54 a.m.

Details

Message ID 201907010854.x618sRG1032238@finist-ce7.sw.ru
State New
Series "ploop: Do not split discard bio in kaio"
Headers show

Commit Message

Konstantin Khorenko July 1, 2019, 8:54 a.m.
The commit is pushed to "branch-rh7-3.10.0-957.21.3.vz7.106.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.21.3.vz7.106.3
------>
commit 44b4e9571214cd711cb3ba343739a45fccf8bc39
Author: Kirill Tkhai <ktkhai@virtuozzo.com>
Date:   Mon Jul 1 11:54:27 2019 +0300

    ploop: Do not split discard bio in kaio
    
    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)