Skip to contentSkip to conversation

examples: uring-cmd-zoned: expand the reasoning behind QD1

PATCH Applied Pankaj Raghav 4 participants 4 messages Oct 7, 2022 – Oct 10, 2022 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20221007120530eucas1p16e2b45344e7148a39789645352a5aba8@eucas1p1.samsung.com

#1 lore raw

PATCH 1/1 examples: uring-cmd-zoned: expand the reasoning behind QD1

Expand the reasoning behind using QD1 for zoned devices with io_uring_cmd engine.

---
 examples/uring-cmd-zoned.fio | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
examples/uring-cmd-zoned.fio +6 -2
index 58e8f79e..89be61be 100644
@@ -1,7 +1,11 @@
 # io_uring_cmd I/O engine for nvme-ns generic zoned character device
 #
-# NOTE: with write workload iodepth must be set to 1 as there is no IO
-# scheduler.
+# NOTE:
+# Regular writes against a zone should be limited to QD1, as the device can
+# reorder the requests.
+#
+# As the passthrough path do not use an IO scheduler (such as mq-deadline),
+# the queue depth should be limited to 1 to avoid zone invalid writes.
 
 [global]
 filename=/dev/ng0n1
Signature · 1 line
2.25.1
Applied
#2 lore raw
Quoted 16 lines · Pankaj Raghav

Expand the reasoning behind using QD1 for zoned devices with io_uring_cmd engine.

---
  examples/uring-cmd-zoned.fio | 8 ++++++--
  1 file changed, 6 insertions(+), 2 deletions(-)
examples/uring-cmd-zoned.fio +0 -1
index 58e8f79e..89be61be 100644
@@ -1,7 +1,11 @@
  # io_uring_cmd I/O engine for nvme-ns generic zoned character device
  #
-# NOTE: with write workload iodepth must be set to 1 as there is no IO

examples/uring-cmd-zoned.fio line 11

Quoted 10 lines
examples/uring-cmd-zoned.fio +6 -1
-# scheduler.
+# NOTE:
+# Regular writes against a zone should be limited to QD1, as the device can
+# reorder the requests.
+#
+# As the passthrough path do not use an IO scheduler (such as mq-deadline),
+# the queue depth should be limited to 1 to avoid zone invalid writes.
 
  [global]
  filename=/dev/ng0n1

Applied. Thanks!

#3 lore raw
In reply to Pankaj Raghav
Quoted 13 lines · Pankaj Raghav

Expand the reasoning behind using QD1 for zoned devices with io_uring_cmd engine.

---
 examples/uring-cmd-zoned.fio | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
examples/uring-cmd-zoned.fio +0 -0
index 58e8f79e..89be61be 100644

examples/uring-cmd-zoned.fio line 8

Quoted 10 lines
examples/uring-cmd-zoned.fio +6 -2
@@ -1,7 +1,11 @@
 # io_uring_cmd I/O engine for nvme-ns generic zoned character device
 #
-# NOTE: with write workload iodepth must be set to 1 as there is no IO
-# scheduler.
+# NOTE:
+# Regular writes against a zone should be limited to QD1, as the device can
+# reorder the requests.
+#
+# As the passthrough path do not use an IO scheduler (such as mq-deadline),
+# the queue depth should be limited to 1 to avoid zone invalid writes.

Since all the writes issued by fio are "valid" in the first place, I would have phrased this: "...to avoid reordering of sequential write commands in the IO stack."

Quoted 3 lines
examples/uring-cmd-zoned.fio +0 -0
 [global]
 filename=/dev/ng0n1
Signature · 2 lines
Damien Le Moal
Western Digital Research
#4 lore raw

Hi Damien,

Quoted 11 lines

examples/uring-cmd-zoned.fio line 8

Quoted 6 lines
examples/uring-cmd-zoned.fio +6 -0
+# NOTE:
+# Regular writes against a zone should be limited to QD1, as the device can
+# reorder the requests.
+#
+# As the passthrough path do not use an IO scheduler (such as mq-deadline),
+# the queue depth should be limited to 1 to avoid zone invalid writes.

Since all the writes issued by fio are "valid" in the first place, I would have phrased this: "...to avoid reordering of sequential write commands in the IO stack."

Block IO stack does not reorder the requests with uring-cmd. As the spec (at least ZNS) does not guarantee the order of execution even if we submit it in order, I expanded the comment here about device reordering the requests.

As you said, writes issues by fio are valid, and IO stack submits the requests in order but still we can get a WP violation because the device can reorder the request during execution.

Signature · 1 line
Pankaj