* [PATCH] nvme-pci: Fix incorrect use of CMB size to calculate q_depth
@ 2018-02-05 22:32 sbates
2018-02-06 9:48 ` Sagi Grimberg
2018-02-06 15:05 ` Keith Busch
0 siblings, 2 replies; 5+ messages in thread
From: sbates @ 2018-02-05 22:32 UTC (permalink / raw)
To: keith.busch, axboe, hch, sagi, linux-nvme, linux-kernel; +Cc: Stephen Bates
From: Stephen Bates <sbates@raithlin.com>
We should not be using the CMB to determine the permissable q_depth
when we don't plan to place any queues in the CMB. In the case of a
small CMB or large numbers of queues this could lead to shallow queues
when they don't need to be.
Signed-off-by: Stephen Bates <sbates@raithlin.com>
---
drivers/nvme/host/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 0bc6a9e..0d099e9 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1913,7 +1913,7 @@ static int nvme_setup_io_queues(struct nvme_dev *dev)
if (nr_io_queues == 0)
return 0;
- if (dev->cmb && (dev->cmbsz & NVME_CMBSZ_SQS)) {
+ if (dev->cmb && use_cmb_sqes && (dev->cmbsz & NVME_CMBSZ_SQS)) {
result = nvme_cmb_qdepth(dev, nr_io_queues,
sizeof(struct nvme_command));
if (result > 0)
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] nvme-pci: Fix incorrect use of CMB size to calculate q_depth
2018-02-05 22:32 [PATCH] nvme-pci: Fix incorrect use of CMB size to calculate q_depth sbates
@ 2018-02-06 9:48 ` Sagi Grimberg
2018-02-06 10:16 ` Max Gurtovoy
2018-02-06 15:05 ` Keith Busch
1 sibling, 1 reply; 5+ messages in thread
From: Sagi Grimberg @ 2018-02-06 9:48 UTC (permalink / raw)
To: sbates, keith.busch, axboe, hch, linux-nvme, linux-kernel
Looks good,
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
I'll pick this one up unless someone thinks I shouldn't..
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] nvme-pci: Fix incorrect use of CMB size to calculate q_depth
2018-02-06 9:48 ` Sagi Grimberg
@ 2018-02-06 10:16 ` Max Gurtovoy
0 siblings, 0 replies; 5+ messages in thread
From: Max Gurtovoy @ 2018-02-06 10:16 UTC (permalink / raw)
To: Sagi Grimberg, sbates, keith.busch, axboe, hch, linux-nvme, linux-kernel
On 2/6/2018 11:48 AM, Sagi Grimberg wrote:
> Looks good,
>
> Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
>
> I'll pick this one up unless someone thinks I shouldn't..
Looks good to me (I can imagine what scenario failed this :) ),
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] nvme-pci: Fix incorrect use of CMB size to calculate q_depth
2018-02-05 22:32 [PATCH] nvme-pci: Fix incorrect use of CMB size to calculate q_depth sbates
2018-02-06 9:48 ` Sagi Grimberg
@ 2018-02-06 15:05 ` Keith Busch
2018-02-06 15:56 ` Stephen Bates
1 sibling, 1 reply; 5+ messages in thread
From: Keith Busch @ 2018-02-06 15:05 UTC (permalink / raw)
To: sbates; +Cc: axboe, hch, sagi, linux-nvme, linux-kernel
On Mon, Feb 05, 2018 at 03:32:23PM -0700, sbates@raithlin.com wrote:
>
> - if (dev->cmb && (dev->cmbsz & NVME_CMBSZ_SQS)) {
> + if (dev->cmb && use_cmb_sqes && (dev->cmbsz & NVME_CMBSZ_SQS)) {
Is this a prep patch for something coming later? dev->cmb is already
NULL if use_cmb_sqes is false.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] nvme-pci: Fix incorrect use of CMB size to calculate q_depth
2018-02-06 15:05 ` Keith Busch
@ 2018-02-06 15:56 ` Stephen Bates
0 siblings, 0 replies; 5+ messages in thread
From: Stephen Bates @ 2018-02-06 15:56 UTC (permalink / raw)
To: Keith Busch; +Cc: axboe, hch, sagi, linux-nvme, linux-kernel
> On Feb 6, 2018, at 8:02 AM, Keith Busch <keith.busch@intel.com> wrote:
>
>> On Mon, Feb 05, 2018 at 03:32:23PM -0700, sbates@raithlin.com wrote:
>>
>> - if (dev->cmb && (dev->cmbsz & NVME_CMBSZ_SQS)) {
>> + if (dev->cmb && use_cmb_sqes && (dev->cmbsz & NVME_CMBSZ_SQS)) {
>
> Is this a prep patch for something coming later? dev->cmb is already
> NULL if use_cmb_sqes is false.
Thanks Keith.
Not sure how I missed this. I was working on OOT patches to enable WDS and RDS in the CMB. I *thought* I’d confirmed this patch was applicable to upstream. Looks like I did not do that correctly.
Sorry for the churn. We can leave this patch out for now. Thanks for the prompt feedback everyone!
Stephen
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-02-06 15:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-05 22:32 [PATCH] nvme-pci: Fix incorrect use of CMB size to calculate q_depth sbates
2018-02-06 9:48 ` Sagi Grimberg
2018-02-06 10:16 ` Max Gurtovoy
2018-02-06 15:05 ` Keith Busch
2018-02-06 15:56 ` Stephen Bates
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).