Linux block layer
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Tal Zussman <tz2294@columbia.edu>
Cc: Christoph Hellwig <hch@infradead.org>, Jan Kara <jack@suse.cz>,
	Jens Axboe <axboe@kernel.dk>,
	"Matthew Wilcox (Oracle)" <willy@infradead.org>,
	Christian Brauner <brauner@kernel.org>,
	"Darrick J. Wong" <djwong@kernel.org>,
	Carlos Maiolino <cem@kernel.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Dave Chinner <dgc@kernel.org>,
	Bart Van Assche <bvanassche@acm.org>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-mm@kvack.org, Gao Xiang <xiang@kernel.org>
Subject: Re: [PATCH v6 1/4] block: add task-context bio completion infrastructure
Date: Tue, 28 Jul 2026 23:27:32 -0700	[thread overview]
Message-ID: <ammdVAKErVaSboKA@infradead.org> (raw)
In-Reply-To: <8124341f-3af2-4a16-897d-38db5ab5a9d4@columbia.edu>

On Wed, Jul 29, 2026 at 02:11:17AM -0400, Tal Zussman wrote:
> No worries, and apologies again for the delay. I had some deadlines and
> travel that kept me busy, but I have some additional results below:

Cool!

> 
> First, I investigated the workload C behavior further. The underlying
> problem is that ioends routed to the XFS completion workqueue were also
> carrying BIO_COMPLETE_IN_TASK, so unwritten completions bounced through the
> block-layer worker (plus its delay) only to be queued on
> m_unwritten_workqueue afterwards. The ioend workqueue already provides the
> task context the flag asks for, so something like this avoids the bounce:

Ah, cool - yes, we should not double-defer.  I suspect we might be
able to do something cleaner than the setting and clearing, but as I
have some work pending in that area I'm happy to look into that after
the basic series lands.

> C) 4k buffered randwrite, qd32 (~118k completions/s)
>   bandwidth (MB/s)                 649.5       655.7       643.4
>   write lat p50 (us)               215.4       214.7       216.1
>   write lat p99.9 (us)             703.1       984.4       730.5
>   context switches                20.69M      21.98M      21.44M
>   cycles                         922.5e9     838.1e9     911.3e9

This is a surprisingly larger drop.

> D) 64k buffered mixed r/w, qd32 (~11k completions/s)
>   bandwidth (MB/s)                 761.2       753.2       757.2

and this a somewhat surprising improvement.

How stable are the results?

> Again, my main concern with this approach is that 16000 (or 1000) is a
> somewhat arbitrary value that depends on disk performance. If the C p99.9
> perf is an acceptable trade-off, I think we can get rid of the delay, but
> I'd appreciate more thoughts on that and the XFS diff above.
> 
> I'll send v7 with the rest of the changes (Sashiko review, etc.) in a day or
> two, pending any additional feedback.

I'd be tempted to do delay=0 for now to get things going, and then
look into fine-tuning to see if we can come up with a good threshold
instead.

I also think in the longer run avoid the current workqueue and having
some sort of thread without the workqueue scheduling overhead would
be beneficial, as that would entirely avoid wakeups if the thread is
running.  But I'd rather get a nicely working API in first and then
fine tune it later.


  reply	other threads:[~2026-07-29  6:27 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-14 21:51 [PATCH v6 0/4] block: enable RWF_DONTCACHE for block devices Tal Zussman
2026-05-14 21:51 ` [PATCH v6 1/4] block: add task-context bio completion infrastructure Tal Zussman
2026-05-15  2:38   ` Hillf Danton
2026-05-18  6:48   ` Christoph Hellwig
2026-05-22 22:47     ` Tal Zussman
2026-05-25  5:17       ` Christoph Hellwig
2026-05-26 19:29         ` Tal Zussman
2026-05-27  9:42           ` Jan Kara
2026-05-27 13:00             ` Christoph Hellwig
2026-05-29 20:46               ` Tal Zussman
2026-06-01 11:04                 ` Jan Kara
2026-06-18 14:26                   ` Jan Kara
2026-06-22 16:45                     ` Tal Zussman
2026-07-28  4:10                       ` Christoph Hellwig
2026-07-29  6:11                         ` Tal Zussman
2026-07-29  6:27                           ` Christoph Hellwig [this message]
2026-07-29  8:41                           ` Jan Kara
2026-07-29  8:48                             ` Christoph Hellwig
2026-05-22 23:09   ` Tal Zussman
2026-05-25  5:24     ` Christoph Hellwig
2026-05-29  8:49       ` Sebastian Andrzej Siewior
2026-05-14 21:51 ` [PATCH v6 2/4] iomap: use BIO_COMPLETE_IN_TASK for dropbehind writeback Tal Zussman
2026-05-18  6:48   ` Christoph Hellwig
2026-05-14 21:51 ` [PATCH v6 3/4] buffer: add dropbehind writeback support Tal Zussman
2026-05-18  6:49   ` Christoph Hellwig
2026-05-22 23:14   ` Tal Zussman
2026-05-25  5:25     ` Christoph Hellwig
2026-05-14 21:51 ` [PATCH v6 4/4] block: enable RWF_DONTCACHE for block devices Tal Zussman
2026-05-18  6:49   ` Christoph Hellwig
2026-05-22 23:17   ` Tal Zussman
2026-05-25  5:30     ` Christoph Hellwig
2026-05-25 18:06       ` Tal Zussman

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=ammdVAKErVaSboKA@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=bvanassche@acm.org \
    --cc=cem@kernel.org \
    --cc=dgc@kernel.org \
    --cc=djwong@kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=tz2294@columbia.edu \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    --cc=xiang@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