All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Yu Kuai <yukuai1@huaweicloud.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	axboe@kernel.dk, song@kernel.org, xni@redhat.com,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-raid@vger.kernel.org, yi.zhang@huawei.com,
	yangerkun@huawei.com, "yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH 1/4] block: export part_in_flight()
Date: Mon, 14 Apr 2025 04:39:05 -0700	[thread overview]
Message-ID: <Z_zz2RY3zHVGScCK@infradead.org> (raw)
In-Reply-To: <12e79682-21a3-9389-9390-14702d6ca389@huaweicloud.com>

On Mon, Apr 14, 2025 at 02:48:23PM +0800, Yu Kuai wrote:
> > If we export this it needs a kerneldoc comment, and probably also
> > a better name.
> 
> Sure about comment.

I think a name like bdev_count_inflight might also be helpful as there
is nothing partition-specific in the helper.

> There are two kinds of helpers:
> 
> 1) part_in_flight and part_in_flight_rw
> 2) blk_mq_in_flight and blk_mq_in_flight_rw
> 
> 1) is accounted at blk_account_io_start(), while 2) is
> blk_mq_start_request(), I think this is the essential difference.
> 
> part_in_flight_rw() and blk_mq_in_flight_rw() is also used in sysfs API
> inflight for bio/rq based device. And commit 7be835694dae ("block: fix
> that util can be greater than 100%") convert blk_mq_in_flight() to
> part_in_flight() from disk stats API. Now I just checked there is no use
> for blk_mq_in_flight() anymore and maybe it can be removed.

Yeah.  I'm still confused about having the different methods to count
the _rw vs non-_rw variants for blk-mq, but I guess that's not really
in scope for your series.

  reply	other threads:[~2025-04-14 11:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-12  7:31 [PATCH 0/4] md: fix is_mddev_idle() Yu Kuai
2025-04-12  7:31 ` [PATCH 1/4] block: export part_in_flight() Yu Kuai
2025-04-14  6:32   ` Christoph Hellwig
2025-04-14  6:48     ` Yu Kuai
2025-04-14 11:39       ` Christoph Hellwig [this message]
2025-04-12  7:32 ` [PATCH 2/4] md: add a new api sync_io_depth Yu Kuai
2025-04-16  5:32   ` Xiao Ni
2025-04-16  8:19     ` Yu Kuai
2025-04-12  7:32 ` [PATCH 3/4] md: fix is_mddev_idle() Yu Kuai
2025-04-16  6:20   ` Xiao Ni
2025-04-16  7:42     ` Yu Kuai
2025-04-16  9:28       ` Yu Kuai
2025-04-16  9:44         ` Xiao Ni
2025-04-17  1:47           ` Yu Kuai
2025-04-12  7:32 ` [PATCH 4/4] md: cleanup accounting for issued sync IO Yu Kuai
2025-04-16  6:27   ` Xiao Ni

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=Z_zz2RY3zHVGScCK@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=song@kernel.org \
    --cc=xni@redhat.com \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai1@huaweicloud.com \
    --cc=yukuai3@huawei.com \
    /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.