[MDEV-26476] InnoDB is missing futex support on some platforms Created: 2021-08-25 Updated: 2023-11-13 Resolved: 2022-02-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Platform FreeBSD, Storage Engine - InnoDB |
| Affects Version/s: | 10.6.0 |
| Fix Version/s: | 10.9.0, 10.6.8, 10.7.4, 10.8.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | performance, portability | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
In According to https://shift.click/blog/futex-like-apis/ there are a few more platforms that we should be able to support:
When futex support is missing, we will fall back to the SUX_LOCK_GENERIC implementation that is based on native mutexes, condition variables and native rw-locks when available. Not only will this increase the memory footprint, but lock_sys_t::hash_latch::release() could be a scalability bottleneck, because it uses a single mutex and condition variable to ‘emulate’ futex so that we can avoid increasing the memory footprint of lock_sys.rec_hash. To be determined: Are any futex-like operations available on other operating systems where MariaDB Server might be able to run?
|
| Comments |
| Comment by Marko Mäkelä [ 2022-02-18 ] | ||||||||||||||||
|
On DragonFly BSD v6.2.1, I had to apply the following patch to get MariaDB Server to compile:
On FreeBSD 13, the compilation worked out of the box. On both systems, I successfully tested the implementation with
Without futex support, the test suite would have failed due to |