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

Christoph Hellwig hch at lst.de
Tue Oct 20 23:55:10 PDT 2015

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.

More information about the Linux-nvme mailing list