Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 5.8 11/42] nvme: skip noiob for zoned devices
       [not found] <20200831152934.1023912-1-sashal@kernel.org>
@ 2020-08-31 15:29 ` Sasha Levin
  2020-08-31 15:38   ` Keith Busch
  2020-08-31 15:29 ` [PATCH AUTOSEL 5.8 12/42] nvmet: Disable keep-alive timer when kato is cleared to 0h Sasha Levin
  1 sibling, 1 reply; 4+ messages in thread
From: Sasha Levin @ 2020-08-31 15:29 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Keith Busch, Jens Axboe, Sagi Grimberg, linux-nvme, Sasha Levin

From: Keith Busch <kbusch@kernel.org>

[ Upstream commit c41ad98bebb8f4f0335b3c50dbb7583a6149dce4 ]

Zoned block devices reuse the chunk_sectors queue limit to define zone
boundaries. If a such a device happens to also report an optimal
boundary, do not use that to define the chunk_sectors as that may
intermittently interfere with io splitting and zone size queries.

Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/nvme/host/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index f38548e6d55ec..6ea0bab621df3 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1975,7 +1975,7 @@ static int __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id)
 		}
 	}
 
-	if (iob)
+	if (iob && !blk_queue_is_zoned(ns->queue))
 		blk_queue_chunk_sectors(ns->queue, rounddown_pow_of_two(iob));
 	nvme_update_disk_info(disk, ns, id);
 #ifdef CONFIG_NVME_MULTIPATH
-- 
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] 4+ messages in thread

* [PATCH AUTOSEL 5.8 12/42] nvmet: Disable keep-alive timer when kato is cleared to 0h
       [not found] <20200831152934.1023912-1-sashal@kernel.org>
  2020-08-31 15:29 ` [PATCH AUTOSEL 5.8 11/42] nvme: skip noiob for zoned devices Sasha Levin
@ 2020-08-31 15:29 ` Sasha Levin
  1 sibling, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2020-08-31 15:29 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Jens Axboe, Sasha Levin, Sagi Grimberg, linux-nvme, Amit Engel

From: Amit Engel <amit.engel@dell.com>

[ Upstream commit 0d3b6a8d213a30387b5104b2fb25376d18636f23 ]

Based on nvme spec, when keep alive timeout is set to zero
the keep-alive timer should be disabled.

Signed-off-by: Amit Engel <amit.engel@dell.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/nvme/target/core.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index 6e2f623e472e9..58b035cc67a01 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -396,6 +396,9 @@ static void nvmet_keep_alive_timer(struct work_struct *work)
 
 static void nvmet_start_keep_alive_timer(struct nvmet_ctrl *ctrl)
 {
+	if (unlikely(ctrl->kato == 0))
+		return;
+
 	pr_debug("ctrl %d start keep-alive timer for %d secs\n",
 		ctrl->cntlid, ctrl->kato);
 
@@ -405,6 +408,9 @@ static void nvmet_start_keep_alive_timer(struct nvmet_ctrl *ctrl)
 
 static void nvmet_stop_keep_alive_timer(struct nvmet_ctrl *ctrl)
 {
+	if (unlikely(ctrl->kato == 0))
+		return;
+
 	pr_debug("ctrl %d stop keep-alive\n", ctrl->cntlid);
 
 	cancel_delayed_work_sync(&ctrl->ka_work);
-- 
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] 4+ messages in thread

* Re: [PATCH AUTOSEL 5.8 11/42] nvme: skip noiob for zoned devices
  2020-08-31 15:29 ` [PATCH AUTOSEL 5.8 11/42] nvme: skip noiob for zoned devices Sasha Levin
@ 2020-08-31 15:38   ` Keith Busch
  2020-09-05 12:03     ` Sasha Levin
  0 siblings, 1 reply; 4+ messages in thread
From: Keith Busch @ 2020-08-31 15:38 UTC (permalink / raw)
  To: Sasha Levin; +Cc: Jens Axboe, linux-nvme, linux-kernel, stable, Sagi Grimberg

On Mon, Aug 31, 2020 at 11:29:03AM -0400, Sasha Levin wrote:
> From: Keith Busch <kbusch@kernel.org>
> 
> [ Upstream commit c41ad98bebb8f4f0335b3c50dbb7583a6149dce4 ]
> 
> Zoned block devices reuse the chunk_sectors queue limit to define zone
> boundaries. If a such a device happens to also report an optimal
> boundary, do not use that to define the chunk_sectors as that may
> intermittently interfere with io splitting and zone size queries.
> 
> Signed-off-by: Keith Busch <kbusch@kernel.org>
> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
> Signed-off-by: Sasha Levin <sashal@kernel.org>

You can safely drop this from stable: nvme zoned devices were only introduced
to linux in 5.9.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH AUTOSEL 5.8 11/42] nvme: skip noiob for zoned devices
  2020-08-31 15:38   ` Keith Busch
@ 2020-09-05 12:03     ` Sasha Levin
  0 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2020-09-05 12:03 UTC (permalink / raw)
  To: Keith Busch; +Cc: Jens Axboe, linux-nvme, linux-kernel, stable, Sagi Grimberg

On Mon, Aug 31, 2020 at 09:38:18AM -0600, Keith Busch wrote:
>On Mon, Aug 31, 2020 at 11:29:03AM -0400, Sasha Levin wrote:
>> From: Keith Busch <kbusch@kernel.org>
>>
>> [ Upstream commit c41ad98bebb8f4f0335b3c50dbb7583a6149dce4 ]
>>
>> Zoned block devices reuse the chunk_sectors queue limit to define zone
>> boundaries. If a such a device happens to also report an optimal
>> boundary, do not use that to define the chunk_sectors as that may
>> intermittently interfere with io splitting and zone size queries.
>>
>> Signed-off-by: Keith Busch <kbusch@kernel.org>
>> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
>> Signed-off-by: Jens Axboe <axboe@kernel.dk>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>
>You can safely drop this from stable: nvme zoned devices were only introduced
>to linux in 5.9.

Dropped, thanks!

-- 
Thanks,
Sasha

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-05 12:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20200831152934.1023912-1-sashal@kernel.org>
2020-08-31 15:29 ` [PATCH AUTOSEL 5.8 11/42] nvme: skip noiob for zoned devices Sasha Levin
2020-08-31 15:38   ` Keith Busch
2020-09-05 12:03     ` Sasha Levin
2020-08-31 15:29 ` [PATCH AUTOSEL 5.8 12/42] nvmet: Disable keep-alive timer when kato is cleared to 0h Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox