server
server copied to clipboard
MDEV-36234: Add innodb_linux_aio
- [x] The Jira issue number for this PR is: MDEV-36234
Description
The parameter innodb_linux_aio controls which Linux implementation to use for innodb_use_native_aio=ON.
innodb_linux_aio=auto is equivalent to innodb_linux_aio=io_uring when it is available, and falling back to innodb_linux_aio=aio when not.
Debian packaging is no longer aio exclusive or uring, so for those older Debian or Ubuntu releases, its a remove_uring directive. For more recent releases, add mandatory liburing for consistent packaging.
WITH_LIBAIO is now an independent option from WITH_URING.
is_linux_native_aio_supported(): Remove. This had originally been added in mysql/mysql-server@0da310b69db3a39ba2e6d63ff62ef3c027cd63ff in 2012 to fix an issue where io_submit() on CentOS 5.5 would return EINVAL for a /tmp/#sql*.ibd file associated with CREATE TEMPORARY TABLE. But, starting with 2e814d4702d71a04388386a9f591d14a35980bfe InnoDB temporary tables will be written to innodb_temp_data_file_path. The 2012 commit said that the error could occur on "old kernels". Any GNU/Linux distribution that we currently support should be based on a newer Linux kernel; for example, Red Hat Enterprise Linux 7 was released in 2014.
This is joint work with @grooverdan and @vaintroub.
Release Notes
The parameter innodb_linux_aio controls which Linux implementation to use for innodb_use_native_aio=ON.
innodb_linux_aio=auto is equivalent to innodb_linux_aio=io_uring when it is available, and falling back to innodb_linux_aio=aio when not.
How can this PR be tested?
This is rather well covered on https://buildbot.mariadb.org. The MemorySanitizer builders will disable both libaio and liburing. Unfortunately, our RHEL 7 builders seem to run on a mismatching Linux kernels, either 4.18 from RHEL 8 or 6.x from Debian.
Basing the PR against the correct MariaDB version
- [ ] This is a new feature or a refactoring, and the PR is based against the
mainbranch. - [ ] This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.
We are basing this on 10.11 instead of 10.6, with the assumption that there is no liburing capable GNU/Linux distribution that would by default ship MariaDB Server 10.6.
PR quality check
- [x] I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
- [x] For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.