Bug #111689 optimize for page flush
Submitted: 7 Jul 2023 8:25 Modified: 7 Jul 2023 8:30
Reporter: alex xing (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S5 (Performance)
Version:8.0.33 OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution

[7 Jul 2023 8:25] alex xing
Description:
bpage->get_io_fix() ! = BUF_IO_NONE is the common determination logic for buf_flush_ready_for_replace and buf_flush_ready_for_flush.

In the original flush logic, if bpage->get_io_fix()! = BUF_IO_NONE, will go twice to interpret the redundant judgment

I think we can move this judgment forward to avoid repeating it

How to repeat:
just read the code

Suggested fix:
move this judgment forward to avoid repeating it, just as the below patch
[7 Jul 2023 8:25] alex xing
a simple patch to describe the optimization

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: flush_optimzie.patch (text/plain), 1.14 KiB.

[7 Jul 2023 8:30] MySQL Verification Team
Hello alex xing,

Thank you very much for your patch contribution, we appreciate it!

regards,
Umesh