[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240213064204.GB23305@lst.de>
Date: Tue, 13 Feb 2024 07:42:04 +0100
From: Christoph Hellwig <hch@....de>
To: John Garry <john.g.garry@...cle.com>
Cc: axboe@...nel.dk, kbusch@...nel.org, hch@....de, 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 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?
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.
Please also read through TP4098(a) and look at the MAM field. 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.
Powered by blists - more mailing lists