[PATCH v4 5/5] nvme: enable FDP support
Kanchan Joshi
joshi.k at samsung.com
Tue Sep 10 02:25:58 PDT 2024
On 9/6/2024 9:34 PM, Keith Busch wrote:
> On Mon, Aug 26, 2024 at 10:36:06PM +0530, Kanchan Joshi wrote:
>> Flexible Data Placement (FDP), as ratified in TP 4146a, allows the host
>> to control the placement of logical blocks so as to reduce the SSD WAF.
>>
>> Userspace can send the data placement information using the write hints.
>> Fetch the placement-identifiers if the device supports FDP.
>>
>> The incoming placement hint is mapped to a placement-identifier, which
>> in turn is set in the DSPEC field of the write command.
>>
>> Signed-off-by: Kanchan Joshi <joshi.k at samsung.com>
>> Signed-off-by: Nitesh Shetty <nj.shetty at samsung.com>
>> Signed-off-by: Hui Qi <hui81.qi at samsung.com>
>
> I'm still fine with this nvme implementation.
>
> Acked-by: Keith Busch <kbusch at kernel.org>
>
> The reporting via fcntl looks okay to me, but I've never added anything
> to that interface, so not sure if there's any problem using it for this.
>
The difference comes only in the fcntl interface (hint type/value pair
rather than just value), otherwise it piggybacks on the same kernel
infrastructure that ensures the hint is propagated fine. So I do not
foresee problems.
And FWIW, we have had precedents when a revamped fcntl was introduced to
do what was not possible with the existing fcntl. Like:
F_{GET/SET}OWN_EX over F_{GET/SET}OWN.
Per-file hinting has its uses, particularly for buffered IO. But the
current interface can only do data-lifetime hints. The revamped
interface may come handy for other things too (e.g., KPIO).
More information about the Linux-nvme
mailing list