mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Feng <steven@joint-cloud.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	Steven Feng <steven@joint-cloud.com>
Subject: Re: [PATCH] block: optimize I/O merge hot path with unlikely() hints
Date: Tue,  9 Jun 2026 16:24:10 +0800	[thread overview]
Message-ID: <tencent_D401AE078217E74AB03222FB6EFCCE443607@qq.com> (raw)
In-Reply-To: <ZmUjB3aF8K1xYzHr@lst.de>

On Tue, Jun 09, 2026 at 12:38:47AM -0700, Christoph Hellwig wrote:
> Umm, these are not failures.  Just conditions to not merge because
> of this, and not merging, both because of these conditions and others,
> it the most common case for most workloads.

You're absolutely right. I misunderstood the workload characteristics.
I incorrectly assumed these were rare failure cases rather than common
merge rejection conditions.

> With your patch the object file size of blk-merge.o increases slightly
> for me on x86_64:
> 
> What kind of optimization are you attempting and how did you measure
> the results of this "optimizatіon"?

I apologize - I did not properly measure the impact. I was focused on 
code style cleanup (removing '== false' comparisons) and incorrectly
added unlikely() hints based on a flawed assumption about branch 
frequency.

Given the increased code size and my incorrect understanding of the
workload, please disregard this patch.

Thank you for the detailed feedback. I'll be more careful to profile
and measure before claiming performance improvements in the future.

Steven


       reply	other threads:[~2026-06-09  8:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260606024218.12345-1-steven@joint-cloud.com>
     [not found] ` <ZmUjB3aF8K1xYzHr@lst.de>
2026-06-09  8:24   ` Steven Feng [this message]
2026-06-06  2:42 Steven Feng
2026-06-08 14:34 ` Jens Axboe
2026-06-09  7:38 ` Christoph Hellwig

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=tencent_D401AE078217E74AB03222FB6EFCCE443607@qq.com \
    --to=steven@joint-cloud.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --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

all inboxes | Powered by JetHome®