mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] blk-mq: reuse code in blk_mq_check_inflight*()
Date: Mon, 30 Sep 2019 12:20:18 +0300	[thread overview]
Message-ID: <97498865-bb36-7367-4cf3-de6d812b23cb@gmail.com> (raw)
In-Reply-To: <20190930083324.GA24152@infradead.org>

On 9/30/2019 11:33 AM, Christoph Hellwig wrote:
> On Mon, Sep 30, 2019 at 11:27:32AM +0300, Pavel Begunkov (Silence) wrote:
>> From: Pavel Begunkov <asml.silence@gmail.com>
>>
>> 1. Reuse the same walker callback for both blk_mq_in_flight() and
>> blk_mq_in_flight_rw().
>>
>> 2. Store inflight counters immediately in struct mq_inflight.
>> It's type-safer and removes extra indirection.
> 
> You really want to split this into two patches.  Part 2 looks very

Good point, diff is peculiarly aligned indeed. I will resend it.

> sensible to me, but I don't really see how 1 is qn equivalent
> transformation right now.  Splitting it out and writing a non-trivial
> changelog might help understanding it if you think it really is
> equivalent as-is.
> 

blk_mq_check_inflight() increments only inflight[0].
blk_mq_check_inflight_rw() increments inflight[0] or inflight[1]
depending on a flag, so summing them gives what the first function returns.

-- 
Yours sincerely,
Pavel Begunkov

  reply	other threads:[~2019-09-30  9:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-30  8:27 Pavel Begunkov (Silence)
2019-09-30  8:33 ` Christoph Hellwig
2019-09-30  9:20   ` Pavel Begunkov [this message]
2019-09-30 18:55 ` [PATCH v2 0/2] Simplify blk_mq_in_flight* Pavel Begunkov (Silence)
2019-09-30 18:55   ` [PATCH v2 1/2] blk-mq: Reuse callback in blk_mq_in_flight*() Pavel Begunkov (Silence)
2019-09-30 18:55   ` [PATCH v2 2/2] blk-mq: Embed counters into struct mq_inflight Pavel Begunkov (Silence)
2019-10-02  3:40   ` [PATCH v2 0/2] Simplify blk_mq_in_flight* 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=97498865-bb36-7367-4cf3-de6d812b23cb@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome