[PATCH] nvme: implement support for nvme relaxed effects
Chaitanya Kulkarni
chaitanyak at nvidia.com
Tue Feb 6 00:34:39 PST 2024
>> + if (effects & NVME_CMD_EFFECTS_CSER_MASK)
>> + effects &= ~NVME_CMD_EFFECTS_CSE_MASK;
>> }
looking at the code again we are not using NVME_CMD_EFFECTS_CSER_MASK
anywhere in the code to guarantee the admin-cmd exclusive execution
guarantee, is there a specific reason for that ?
According to spec:-
Figure 221: Command Supported and Effects data structure
*Bits 15:14
*Value :- 01b
*Definition :-
The command associated with this structure should only be submitted
when there is no outstanding Admin command that affects any namespace
and no Admin command should be submitted that affects any namespace
until this command is complete.
IOW, don't we need to freeze the admin queue when controller sets the CSER
value to 01b until command is completed ? or it is not done/needed for
a specific reason ?
>> return effects;
>> diff --git a/include/linux/nvme.h b/include/linux/nvme.h
>> index bc605ec4a3fd0..3ef4053ea9500 100644
>> --- a/include/linux/nvme.h
>> +++ b/include/linux/nvme.h
>> @@ -646,6 +646,7 @@ enum {
>> NVME_CMD_EFFECTS_NCC = 1 << 2,
>> NVME_CMD_EFFECTS_NIC = 1 << 3,
>> NVME_CMD_EFFECTS_CCC = 1 << 4,
>> + NVME_CMD_EFFECTS_CSER_MASK = GENMASK(15, 14),
>> NVME_CMD_EFFECTS_CSE_MASK = GENMASK(18, 16),
>> NVME_CMD_EFFECTS_UUID_SEL = 1 << 19,
>> NVME_CMD_EFFECTS_SCOPE_MASK = GENMASK(31, 20),
>
-ck
More information about the Linux-nvme
mailing list