[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1463639921-1824-1-git-send-email-wwtao0320@163.com>
Date: Thu, 19 May 2016 14:38:40 +0800
From: Wenwei Tao <wwtao0320@....com>
To: mb@...htnvm.io
Cc: linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
ww.tao0320@...il.com
Subject: [PATCH 1/2] lightnvm: break the loop when rqd is not null
From: Wenwei Tao <ww.tao0320@...il.com>
Break the loop when rqd is not null to reduce
unnecessary schedule.
Signed-off-by: Wenwei Tao <ww.tao0320@...il.com>
---
drivers/lightnvm/rrpc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
index 2103e97..2915e39 100644
--- a/drivers/lightnvm/rrpc.c
+++ b/drivers/lightnvm/rrpc.c
@@ -98,6 +98,9 @@ static void rrpc_discard(struct rrpc *rrpc, struct bio *bio)
do {
rqd = rrpc_inflight_laddr_acquire(rrpc, slba, len);
+ if (rqd)
+ break;
+
schedule();
} while (!rqd);
--
1.8.3.1
Powered by blists - more mailing lists