fix atomic limits check

alan.adamson at oracle.com alan.adamson at oracle.com
Tue Jun 17 10:40:35 PDT 2025


On 6/15/25 10:36 PM, Christoph Hellwig wrote:
> On Fri, Jun 13, 2025 at 02:22:00PM -0700, alan.adamson at oracle.com wrote:
>> Some testing with my qemu-nvme atomic write setup.  My qemu includes ns
>> atomic parameters that isn't upstream yet.
>> A single subsystem with 4 controllers, 1 of the controllers has 2
>> namespaces.
> .. and none of the namespaces are shared if I parse the command line
> right?

Correct, nothing is shared.

>
>> Does this look right?
> I think it does, at least if I understand the setup correctly.
>
>> Before, we had a single atomic_write_max_bytes value per subsystem.
>> That's not the case now.
> Yes, with AWUPF the value should be different for namespaces with
> different LBA sizes, and with NAWUPF it could be different per namespaces.
>
> Maybe we want an extra sanity check to catch a subsystem reporting
> differnet NAWUPF for the same namespace attached to multiple controllers,
> even if that's against the spec.
>
> And I wonder how we can come up with a testcase to validate all these
> checks..

I changed the config a bit:

CTRL 0 - AWUN=31 AWUPF=15
CTRL 1 - AWUN=31 AWUPF=31
CTRL 2 - AWUN=15 AWUPF=7
CTRL 3 - AWUN=15 AWUPF=15
     NS - NAWUN=31 NAWUPF=15
     NS - NAWUN=127 NAWUPF=63


and his doesn't look right:

[root at localhost ~]# sh testxx.sh nvme0n3
+ nvme id-ctrl /dev/nvme0n3
+ grep cmic
cmic      : 0x2
+ nvme id-ctrl /dev/nvme0n3
+ grep awupf
awupf     : 7
+ nvme id-ns /dev/nvme0n3
+ grep nawupf
nawupf  : 0
+ cat /sys/block/nvme0n3/queue/atomic_write_max_bytes
8192
[root at localhost ~]# dmesg | grep -i awupf
[root at localhost ~]#

AWUPF of 7 isn't consistent with an atomic_write_max_bytes of 8192.

Alan






More information about the Linux-nvme mailing list