[PATCH 06/14] nvmet: use unlikely for uncommon commands
Logan Gunthorpe
logang at deltatee.com
Mon Aug 10 18:01:13 EDT 2020
On 2020-08-10 2:46 p.m., Keith Busch wrote:
> On Mon, Aug 10, 2020 at 11:54:48AM -0700, Chaitanya Kulkarni wrote:
>> I/O commands (nvme_cmd_read, nvme_cmd_write) are most common commands
>> when accessing passthru controller, most controllers should not
>> have set the effects for r/w I/O commnds (atleast I don't know at this
>> moment).
>
> The method that gets effects actually always returns 0 for IO commands,
> which is the case if you are sending this command to a namespace.
>
>> effects = nvme_command_effects(ctrl, ns, req->cmd->common.opcode);
>
> In which case you could skip retrieving effects if ns != NULL.
Is that a safe assumption going forward? If someone changes
nvme_command_effects are they going to know they need to change the
callsite?
Logan
More information about the Linux-nvme
mailing list