* [PATCH] nvmet: use unlikely for req status check
@ 2018-11-19 21:35 Chaitanya Kulkarni
2018-11-19 21:37 ` Sagi Grimberg
2018-11-20 9:35 ` Christoph Hellwig
0 siblings, 2 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2018-11-19 21:35 UTC (permalink / raw)
This patch adds unlikely in the nvmet request completion path for the
status check in the low level function __nvmet_req_complete.
This is helpful in the scenario where host and target connection is
working smoothly.
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
---
drivers/nvme/target/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index e3e158ff207a..ac98e9212274 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -602,7 +602,7 @@ static void __nvmet_req_complete(struct nvmet_req *req, u16 status)
u32 old_sqhd, new_sqhd;
u16 sqhd;
- if (status)
+ if (unlikely(status))
nvmet_set_status(req, status);
if (req->sq->size) {
--
2.17.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] nvmet: use unlikely for req status check
2018-11-19 21:35 [PATCH] nvmet: use unlikely for req status check Chaitanya Kulkarni
@ 2018-11-19 21:37 ` Sagi Grimberg
2018-11-20 9:35 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Sagi Grimberg @ 2018-11-19 21:37 UTC (permalink / raw)
Reviewed-by: Sagi Grimberg <sagi at grimberg.me>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] nvmet: use unlikely for req status check
2018-11-19 21:35 [PATCH] nvmet: use unlikely for req status check Chaitanya Kulkarni
2018-11-19 21:37 ` Sagi Grimberg
@ 2018-11-20 9:35 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2018-11-20 9:35 UTC (permalink / raw)
Thanks,
applied to nvme-4.21.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-20 9:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-19 21:35 [PATCH] nvmet: use unlikely for req status check Chaitanya Kulkarni
2018-11-19 21:37 ` Sagi Grimberg
2018-11-20 9:35 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).