On 10/18/23 12:09, Jens Axboe wrote:
I'm also really against growing struct bio just for this. Why is patch 2
not just using the ioprio field at least?
Hi Jens,
Can you please clarify whether your concern is about the size of struct
bio only or also about the runtime impact of the comparisons that have
been added in attempt_merge() and blk_rq_merge_ok()? It may be possible
to eliminate the overhead of the new comparisons as follows:
* Introduce a union of struct { I/O priority; data lifetime; } and u32.
* Use that union in struct bio instead of bi_ioprio and bi_lifetime.
* Use that union in struct request instead of the ioprio and lifetime
members.
* In attempt_merge() and blk_rq_merge_ok(), compare the u32 union member
instead of comparing the I/O priority and data lifetime separately.
Thanks,
Bart.