mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Li kunyu <likunyu@open-hieco.net>
Cc: axboe@kernel.dk, tj@kernel.org, josef@toxicpanda.com,
	cgroups@vger.kernel.org, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] block: Add done_split_bio() for chained bio post-processing
Date: Tue, 3 Nov 2026 02:30:47 -0800	[thread overview]
Message-ID: <aum31_1jjv7OROxl@infradead.org> (raw)
In-Reply-To: <20261030065945.88742-1-likunyu@open-hieco.net>

On Fri, Oct 30, 2026 at 02:59:43PM +0800, Li kunyu wrote:
> 
> patch 1:  Introduce a new abstract function 'done_split_bio' and call it
> from bio_remaining_done to resolve this issue.
> 
> patch 2: Implement the blkcg_iolatency_done_split_bio callback in
> blk-iolatency to correctly decrement the inflight count when the other
> bio headers, which have not called rq_qos_done_bio(bio), complete.

Why are you not simplify calling rq_qos_done_bio before
bio_remaining_done?  __bi_remaining is only incremented for clones of
various types, and the qos processing should probably happen before
calling back into the submitter anyway.

As far as I can tell all the code here is duplicating the existing
done code without much of an explanation of why we need another copy.

While we're at, the existing code in rq_qos_done_bio added in commit
aa1b46dcdc7b ("block: fix rq-qos breakage from skipping rq_qos_done_bio()")
is extremly wrong and dangerous.  Once a bio completes, bi_bdev
is invalid, the driver could have even used it for something that is not
a block device like md raid5 does, but it certainly does not have any
use for the qos/iocost code.  So it really needs to derive anything
it needs to I/O processing from the bio itself.


      parent reply	other threads:[~2026-11-03 10:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30  6:59 Li kunyu
2026-10-30  6:59 ` [PATCH 1/2] " Li kunyu
2026-10-30  6:59 ` [PATCH 2/2] block/blk-iolatency: Fix inflight decrement for chained bio sub-bios Li kunyu
2026-11-03 10:30 ` Christoph Hellwig [this message]

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=aum31_1jjv7OROxl@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=cgroups@vger.kernel.org \
    --cc=josef@toxicpanda.com \
    --cc=likunyu@open-hieco.net \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@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

all inboxes | Powered by JetHome®