Re: [PATCH] block: optimize I/O merge hot path with unlikely() hints

From: Jens Axboe

Date: Mon Jun 08 2026 - 10:46:58 EST



On Sat, 06 Jun 2026 10:42:18 +0800, Steven Feng wrote:
> Remove redundant '== false' comparisons and add unlikely() branch
> prediction hints in block I/O merge path functions.
>
> These functions (ll_new_hw_segment, ll_merge_requests_fn, and
> blk_rq_merge_ok) are executed on every I/O request merge attempt,
> making them critical hot paths. Data integrity check failures are
> rare events, so marking these conditions as unlikely() helps the
> CPU optimize the common case by improving branch prediction.
>
> [...]

Applied, thanks!

[1/1] block: optimize I/O merge hot path with unlikely() hints
commit: 7ed4aab1381f3439f45032eb860f89d9da5e45c2

Best regards,
--
Jens Axboe