From c9762c3c1a12ce24ef8e6e5f3f6f021cefbb9a17 Mon Sep 17 00:00:00 2001 From: Neeraj Soni Date: Tue, 6 Jun 2017 18:57:07 +0530 Subject: [PATCH] dm: md: Replace scheduling of request with direct call This is found to be improving the performance of Random read and write with FDE enabled. The scheduling was introduced as part of 4.4 kernel for mq support. Change-Id: I300750b5f7f1cff4b81f028ae938e7d2b3652bd2 Signed-off-by: Neeraj Soni --- drivers/md/dm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 5d42d8f09421..1a7b11d57256 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -2191,8 +2191,11 @@ static void dm_request_fn(struct request_queue *q) tio = tio_from_request(rq); /* Establish tio->ti before queuing work (map_tio_request) */ tio->ti = ti; - queue_kthread_work(&md->kworker, &tio->work); + spin_unlock(q->queue_lock); + if (map_request(tio, rq, md) == DM_MAPIO_REQUEUE) + dm_requeue_original_request(md, rq); BUG_ON(!irqs_disabled()); + spin_lock(q->queue_lock); } goto out;