All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH 2/3] block: blk_mq_rq_ctx_init cache ctx/q/hctx
Date: Tue, 19 Oct 2021 11:38:37 +0100	[thread overview]
Message-ID: <6e21b434-832f-a2c4-505e-6a9f511f578e@gmail.com> (raw)
In-Reply-To: <YW5fEpG+4G9XNuzy@infradead.org>

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

  reply	other threads:[~2021-10-19 10:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 20:37 [PATCH 0/3] blk_mq_rq_ctx_init() optimisations Pavel Begunkov
2021-10-18 20:37 ` [PATCH 1/3] block: skip elevator fields init for non-elv queue Pavel Begunkov
2021-10-18 20:37 ` [PATCH 2/3] block: blk_mq_rq_ctx_init cache ctx/q/hctx Pavel Begunkov
2021-10-19  6:00   ` Christoph Hellwig
2021-10-19 10:38     ` Pavel Begunkov [this message]
2021-10-18 20:37 ` [PATCH 3/3] block: cache rq_flags inside blk_mq_rq_ctx_init() Pavel Begunkov
2021-10-18 21:42 ` [PATCH 0/3] blk_mq_rq_ctx_init() optimisations Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6e21b434-832f-a2c4-505e-6a9f511f578e@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.