[PATCH 10/18] nvme: move nvme_setup_flush and nvme_setup_rw to common code

Sagi Grimberg sagig at dev.mellanox.co.il
Wed Oct 21 07:41:40 PDT 2015

On 10/21/2015 9:55 AM, Christoph Hellwig wrote:
> On Tue, Oct 20, 2015 at 02:01:06PM +0300, Sagi Grimberg wrote:
>> I do agree that making these static inline can speed things up here,
>> but the coding style documentation asks to avoid inline'ing functions
>> longer than a few lines of code (See Documentation/CodingStyle Chapter
>> 15: "The inline disease").
>> Do you think this case qualifies as an exception?
> Yes.  The inline is only used once per NVMe transport driver and it's
> used in the absolute fast path in a place where being able to optimize
> the assignments inside and outside the function call will become useful.
> Also all the code is trivial assignments and simple conditionals so it's
> actually pretty small in terms of generated code.

I agree it is better to have them inline...

Reviewed-by: Sagi Grimberg <sagig at mellanox.com>

More information about the Linux-nvme mailing list