Re: [PATCH] block: optimize I/O merge hot path with unlikely() hints
From: Steven Feng
Date: Tue Jun 09 2026 - 04:39:29 EST
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