On 10/19/21 07:00, Christoph Hellwig wrote:
On Mon, Oct 18, 2021 at 09:37:28PM +0100, Pavel Begunkov wrote:
We should have enough of registers in blk_mq_rq_ctx_init(), store them
in local vars, so we don't keep reloading them.
note: keeping q->elevator may look unnecessary, but it's also used
inside inlined blk_mq_tags_from_data().
Is this really making a difference? I'd expect todays hyper-optimizing
compilers to not be tricked into specific register allocations just by
adding a local variable.
Looking again, there are only reads before the use site, so indeed
shouldn't matter. Was left from first versions of the patch where
it wasn't the case.
--
Pavel Begunkov