summaryrefslogtreecommitdiff
path: root/include/linux/timerqueue.h
diff options
context:
space:
mode:
authorSteven Feng <steven@joint-cloud.com>2026-06-06 10:42:18 +0800
committerJens Axboe <axboe@kernel.dk>2026-06-08 07:46:58 -0600
commit7ed4aab1381f3439f45032eb860f89d9da5e45c2 (patch)
treeb17f538f43cbde894c5c8dc0b79a4b7be7bbd1c1 /include/linux/timerqueue.h
parent5ef1b0194b382fafe5023b5b014e4db3b948ee15 (diff)
block: optimize I/O merge hot path with unlikely() hints
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. Changes: - Replace 'func() == false' with 'unlikely(!func())' for better code style and branch prediction This micro-optimization reduces branch misprediction penalties in high-frequency I/O merge paths. Signed-off-by: Steven Feng <steven@joint-cloud.com> Link: https://patch.msgid.link/tencent_79B652BD0CC23E093F27914380F161E7E505@qq.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions