* [PATCH 0/2] cleanup and small improvement
[not found] <CGME20210308191842epcas5p2a21883eef4b6f98492987f80704d09bd@epcas5p2.samsung.com>
@ 2021-03-08 19:18 ` Kanchan Joshi
[not found] ` <CGME20210308191846epcas5p38986c0cecce3eb3530cdbd4c66b9ed06@epcas5p3.samsung.com>
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Kanchan Joshi @ 2021-03-08 19:18 UTC (permalink / raw)
To: linux-nvme; +Cc: kbusch, hch, sagi, axboe, Kanchan Joshi
First patch does away with hard-coded value.
Second patch is a micro-optimization for io passthrough commands.
Kanchan Joshi (2):
nvme: use NVME_CTRL_CMIC_ANA macro
nvme-core: reduce checks for zero command effects
drivers/nvme/host/core.c | 3 ++-
drivers/nvme/host/nvme.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
--
2.25.1
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] nvme: use NVME_CTRL_CMIC_ANA macro
[not found] ` <CGME20210308191846epcas5p38986c0cecce3eb3530cdbd4c66b9ed06@epcas5p3.samsung.com>
@ 2021-03-08 19:18 ` Kanchan Joshi
2021-03-08 20:46 ` Chaitanya Kulkarni
0 siblings, 1 reply; 6+ messages in thread
From: Kanchan Joshi @ 2021-03-08 19:18 UTC (permalink / raw)
To: linux-nvme; +Cc: kbusch, hch, sagi, axboe, Kanchan Joshi
use the macro instead of hard-coded value.
Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
---
drivers/nvme/host/nvme.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 07b34175c6ce..e82407d1ec23 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -745,7 +745,7 @@ static inline void nvme_trace_bio_complete(struct request *req)
static inline int nvme_mpath_init(struct nvme_ctrl *ctrl,
struct nvme_id_ctrl *id)
{
- if (ctrl->subsys->cmic & (1 << 3))
+ if (ctrl->subsys->cmic & NVME_CTRL_CMIC_ANA)
dev_warn(ctrl->device,
"Please enable CONFIG_NVME_MULTIPATH for full support of multi-port devices.\n");
return 0;
--
2.25.1
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] nvme-core: reduce checks for zero command effects
[not found] ` <CGME20210308191851epcas5p3253b85f29279714544c8c14a7525ce7d@epcas5p3.samsung.com>
@ 2021-03-08 19:18 ` Kanchan Joshi
2021-03-08 20:52 ` Chaitanya Kulkarni
0 siblings, 1 reply; 6+ messages in thread
From: Kanchan Joshi @ 2021-03-08 19:18 UTC (permalink / raw)
To: linux-nvme; +Cc: kbusch, hch, sagi, axboe, Kanchan Joshi
For io passthrough commands, effects are exepcted to be zero.
nvme_passthrough_end() does three checks in futility for this case.
Bail out of function-call/checks.
Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
---
drivers/nvme/host/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index e68a8c4ac5a6..ddb495dd0842 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1136,7 +1136,8 @@ void nvme_execute_passthru_rq(struct request *rq)
effects = nvme_passthru_start(ctrl, ns, cmd->common.opcode);
blk_execute_rq(disk, rq, 0);
- nvme_passthru_end(ctrl, effects);
+ if (effects) /* nothing to be done for zero cmd effects */
+ nvme_passthru_end(ctrl, effects);
}
EXPORT_SYMBOL_NS_GPL(nvme_execute_passthru_rq, NVME_TARGET_PASSTHRU);
--
2.25.1
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] nvme: use NVME_CTRL_CMIC_ANA macro
2021-03-08 19:18 ` [PATCH 1/2] nvme: use NVME_CTRL_CMIC_ANA macro Kanchan Joshi
@ 2021-03-08 20:46 ` Chaitanya Kulkarni
0 siblings, 0 replies; 6+ messages in thread
From: Chaitanya Kulkarni @ 2021-03-08 20:46 UTC (permalink / raw)
To: Kanchan Joshi, linux-nvme; +Cc: kbusch, hch, sagi, axboe
On 3/8/21 11:27, Kanchan Joshi wrote:
> use the macro instead of hard-coded value.
>
> Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
Since the macro is used in nvme_mpath_init() it makes sense to keep it
uniform.
Looks good.
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] nvme-core: reduce checks for zero command effects
2021-03-08 19:18 ` [PATCH 2/2] nvme-core: reduce checks for zero command effects Kanchan Joshi
@ 2021-03-08 20:52 ` Chaitanya Kulkarni
0 siblings, 0 replies; 6+ messages in thread
From: Chaitanya Kulkarni @ 2021-03-08 20:52 UTC (permalink / raw)
To: Kanchan Joshi, linux-nvme; +Cc: kbusch, hch, sagi, axboe
On 3/8/21 11:27, Kanchan Joshi wrote:
> For io passthrough commands, effects are exepcted to be zero.
> nvme_passthrough_end() does three checks in futility for this case.
> Bail out of function-call/checks.
>
> Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
Looks good.
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] cleanup and small improvement
2021-03-08 19:18 ` [PATCH 0/2] cleanup and small improvement Kanchan Joshi
[not found] ` <CGME20210308191846epcas5p38986c0cecce3eb3530cdbd4c66b9ed06@epcas5p3.samsung.com>
[not found] ` <CGME20210308191851epcas5p3253b85f29279714544c8c14a7525ce7d@epcas5p3.samsung.com>
@ 2021-03-09 10:06 ` Christoph Hellwig
2 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2021-03-09 10:06 UTC (permalink / raw)
To: Kanchan Joshi; +Cc: linux-nvme, kbusch, hch, sagi, axboe
Thanks,
applied to nvme-5.13.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-03-09 10:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20210308191842epcas5p2a21883eef4b6f98492987f80704d09bd@epcas5p2.samsung.com>
2021-03-08 19:18 ` [PATCH 0/2] cleanup and small improvement Kanchan Joshi
[not found] ` <CGME20210308191846epcas5p38986c0cecce3eb3530cdbd4c66b9ed06@epcas5p3.samsung.com>
2021-03-08 19:18 ` [PATCH 1/2] nvme: use NVME_CTRL_CMIC_ANA macro Kanchan Joshi
2021-03-08 20:46 ` Chaitanya Kulkarni
[not found] ` <CGME20210308191851epcas5p3253b85f29279714544c8c14a7525ce7d@epcas5p3.samsung.com>
2021-03-08 19:18 ` [PATCH 2/2] nvme-core: reduce checks for zero command effects Kanchan Joshi
2021-03-08 20:52 ` Chaitanya Kulkarni
2021-03-09 10:06 ` [PATCH 0/2] cleanup and small improvement 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).