[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0323ba69-dff9-4465-817e-2c349141b753@oracle.com>
Date: Tue, 13 Feb 2024 14:21:25 +0000
From: John Garry <john.g.garry@...cle.com>
To: Christoph Hellwig <hch@....de>
Cc: axboe@...nel.dk, kbusch@...nel.org, sagi@...mberg.me, jejb@...ux.ibm.com,
martin.petersen@...cle.com, djwong@...nel.org, viro@...iv.linux.org.uk,
brauner@...nel.org, dchinner@...hat.com, jack@...e.cz,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-nvme@...ts.infradead.org, linux-xfs@...r.kernel.org,
linux-fsdevel@...r.kernel.org, tytso@....edu, jbongio@...gle.com,
linux-scsi@...r.kernel.org, ming.lei@...hat.com, ojaswin@...ux.ibm.com,
bvanassche@....org, Alan Adamson <alan.adamson@...cle.com>
Subject: Re: [PATCH v3 14/15] nvme: Support atomic writes
On 13/02/2024 06:42, Christoph Hellwig wrote:
> On Wed, Jan 24, 2024 at 11:38:40AM +0000, John Garry wrote:
>> From: Alan Adamson <alan.adamson@...cle.com>
>>
>> Support reading atomic write registers to fill in request_queue
>> properties.
>>
>> Use following method to calculate limits:
>> atomic_write_max_bytes = flp2(NAWUPF ?: AWUPF)
>> atomic_write_unit_min = logical_block_size
>> atomic_write_unit_max = flp2(NAWUPF ?: AWUPF)
>> atomic_write_boundary = NABSPF
>
> Can you expand this to actually be a real commit log with full
> sentences, expanding the NVME field name acronyms and reference
> the relevant Sections and Figures in a specific version of the
> NVMe specification?
ok
>
> Also some implementation comments:
>
> NVMe has a particularly nasty NABO field in Identify Namespace, which
> offsets the boundary. We probably need to reject atomic writes or
> severly limit them if this field is set.
ok, and initially we'll just not support atomic writes for NABO != 0
>
> Please also read through TP4098(a) and look at the MAM field.
It's not public, AFAIK.
And I don't think a feature which allows us to straddle boundaries is
too interesting really.
> As far
> as I can tell the patch as-is assumes it always is set to 1.
>
>> +static void nvme_update_atomic_write_disk_info(struct gendisk *disk,
>> + struct nvme_ctrl *ctrl, struct nvme_id_ns *id, u32 bs, u32 atomic_bs)
>
> Please avoid the overly long line here.
>
>> + nvme_update_atomic_write_disk_info(disk, ctrl, id, bs, atomic_bs);
>
> .. and here.
ok, but I think that this will get shorter anyway.
>
Thanks,
John
Powered by blists - more mailing lists