Skip to contentSkip to conversation

block: optimize I/O merge hot path with unlikely() hints

PATCH Steven Feng 1 participant 1 message Jun 9 2 messages not in the archive Block layer

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 3 lines · Christoph Hellwig

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.

Quoted 5 lines

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